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
HDBKToggleButton.Caption = "Hide Blank Rows"
b.EntireRow.Hidden = False
End If
End Sub

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
21 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
flashing a white screen while open new tab
cntvertex in Discussions on
13 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
28 Replies