Forum Discussion
Deleted
Jul 02, 2019Macro/VBA button help
Greetings! I'm hoping someone can help with a project I'm currently working on. I'm revamping a spreadsheet for work that we use to track hours spent on a project. I have a table that contains the...
Deleted
Jul 02, 2019Deleted
Solved! A kindly Reddit user helped me out and thought I'd share it here:
Col - Column where you're looking for zero values, "A" in the example
UpR - Upper range, last row of data
LowR - Lower range, first row of data
Private Sub ToggleButton1_Click() Set WS = Worksheets("Sheet1") Col = "A" UpR = 25 LowR = 1 If ToggleButton1.Value = True Then With WS For FR = UpR To LowR Step -1 If .Range(Col & FR) = 0 Then .Rows(FR).Hidden = True End If Next FR End With End If If ToggleButton1.Value = False Then WS.Rows.EntireRow.Hidden = False End If End Sub
https://www.reddit.com/r/excel/comments/c8c0b3/can_someone_help_with_my_macrovba_button_woes/?utm_source=share&utm_medium=ios_app&utm_name=ios_share_flow_optimization&utm_term=enabled