I know this can be done better, and could definitely cut down on the nested IF statements. But wanted to try and get you something before heading home today.
Normal module and assigning each shape to the macro. See the attached as well.
Sub HideRows()
Dim sht As Worksheet
Dim r As Long, lrow As Long
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Set sht = ActiveSheet
lrow = Range("H8").End(xlDown).Row
'Hide all Rows
For r = lrow To 8 Step -1
sht.Rows(r).EntireRow.Hidden = True
Next r
'UnHide checked items
For r = lrow To 8 Step -1
'PPV
If ActiveSheet.Shapes("Check Box 5").OLEFormat.Object.Value = 1 Then
If Cells(r, 8).Value = "PPV" Then
Rows(r).EntireRow.Hidden = False
End If
End If
'FN
If ActiveSheet.Shapes("Check Box 6").OLEFormat.Object.Value = 1 Then
If Cells(r, 8).Value = "FN" Then
Rows(r).EntireRow.Hidden = False
End If
End If
'FNP
If ActiveSheet.Shapes("Check Box 7").OLEFormat.Object.Value = 1 Then
If Cells(r, 8).Value = "FNP" Then
Rows(r).EntireRow.Hidden = False
End If
End If
Next r
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
End Sub
Bookmarks