This post will guide you how to hide rows with zero values in the selected range with VBA Macro in Excel. How do I hide rows which contain zero value in Excel.
Hide Rows with Zero Value
Assuming that you have a list of data in range A1:C5, in which contain sale values. And you want to hide rows if any of the cells in Column C are equal to zero. How to do it. You can use an Excel VBA Macro to quickly achieve the result of hiding rows with zero value. Just do the following steps:
#1 open your excel workbook and then click on “Visual Basic” command under DEVELOPER Tab, or just press “ALT+F11” shortcut.
#2 then the “Visual Basic Editor” window will appear.
#3 click “Insert” ->”Module” to create a new module.
#4 paste the below VBA code into the code window. Then clicking “Save” button.
#5 back to the current worksheet, then run the above excel macro. Click Run button.
#6 select one range that you want to hide rows, such as: A1:C5.
#7 Let’s see the last result:
Leave a Reply
You must be logged in to post a comment.