Your code appears to hide row 2. Maybe you want to have your begin row be farther down. I added a couple of things to hopefully speed up the code.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$2" Then
Select Case Target
Case "Yes"
Call HideRows
Case "No"
Call UnHideRows
End Select
End If
End Sub
Sub HideRows()
BeginRow = 1
EndRow = 2953
ChkCol = 9
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
For RowCnt = BeginRow To EndRow
If Cells(RowCnt, ChkCol).Value = "" Then
Cells(RowCnt, ChkCol).EntireRow.Hidden = True
End If
Next RowCnt
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
End Sub
Sub UnHideRows()
BeginRow = 1
EndRow = 2953
ChkCol = 9
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
For RowCnt = BeginRow To EndRow
If Cells(RowCnt, ChkCol).Value = "" Then
Cells(RowCnt, ChkCol).EntireRow.Hidden = False
End If
Next RowCnt
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
End Sub
Bookmarks