Home

Toggle Button - show/hide all rows where cells contain "BLANK"

Jamie Ormand
New Contributor

I've created a helper column to return the word "BLANK" IF two cells are empty.

Now I want to create a toggle button to show and hide the blank rows (and change the name of the button). This is working for the FIRST found row in the range... how to I make it continue through G50?

 

Private Sub HDBKToggleButton_Click()
Set b = Columns("G").Find(What:="BLANK", LookIn:=xlFormulas)
If HDBKToggleButton.Caption = "Hide Blank Rows" Then
HDBKToggleButton.Caption = "Show Blank Rows"
b.EntireRow.Hidden = True
Else
HDBKToggleButton.Caption = "Hide Blank Rows"
b.EntireRow.Hidden = False
End If
End Sub

Related Conversations
Conditional Formatting - Consider Only Value as Lowest Value
Ben Smith in Excel on
2 Replies
Hiding object/page URL info at bottom of page
Demi- in Discussions on
1 Replies
Taking values from certain rows based on data input
Drakerla in Excel on
5 Replies
How to SUM Data from non-regular rows
Andy_Przybysz in Excel on
1 Replies