Hide/Unhide rows where cells are blank

chicoheineken

New Member
Joined
Apr 18, 2008
Messages
8
I have a command button which I would like to use to hide/unhide rows when there is a blank cell in a column.

Basically:

If cell AA3 = 1, then hide rows where column C is blank between C4:C100.
If cell AA3 = 2, then hide rows where column D is blank between C4:C100.
If cell AA3 = 3, then hide rows where column E is blank between C4:C100.
If cell AA3 = 4, then hide rows where column F is blank between C4:C100.
If cell AA3 = 5, then hide rows where column G is blank between C4:C100.
If cell AA3 = 6, then hide rows where column H is blank between C4:C100.

Note that I would like to hide the full row and not just the cell in the referenced column.

Any help is greatly appreciated guys.
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Try like this

Code:
If Range("AA3").Value = 1 Then Range("C4:C100").SpecialCells(xlCellTypeBlanks).EntireRow.Hidden = True
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,717
Members
452,939
Latest member
WCrawford

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top