I have written VBA code to hide specific ranges in 4 different tabs in my workbook. I am looking to add another range to the code that would hide rows based on cell value in the same range on each of the 4 different tabs. If the cell in range B9-B13 is blank, then hide that specific row on each tab.
Here is my current code:
Sub HideRowsSummary()
Dim wsMySheet As Worksheet
Dim lngMyRow As Long
Application.ScreenUpdating = False
For Each wsMySheet In ThisWorkbook.Sheets
Select Case wsMySheet.Name
Case Is = "Summary 1", "Summary (2)", "Summary (3)", "Summary (4)"
For lngMyRow = 73 To 24 Step -1 'Need to work backwards through the rows when hiding or deleting
If Len(wsMySheet.Range("A" & lngMyRow)) = 0 Then
wsMySheet.Range("A" & lngMyRow).EntireRow.Hidden = True
Else
wsMySheet.Range("A" & lngMyRow).EntireRow.Hidden = False
End If
Next lngMyRow
End Select
Next wsMySheet
Application.ScreenUpdating = True
End Sub
Thank you for looking!