I have this Macro to hide/unhide rows depending on the first column value.
The problem is that it examines row by row and it takes very long since the values on the columns keep changing depending on a formula.
Is there a way to examine all rows at the same time and hide/unhide them in a second. Or at the same rate that the data updates?
-----------------------------------------------------------
Sub HideRows()
BeginRow = 11
EndRow = 59
ChkCol = 3
For RowCnt = BeginRow To EndRow
If Cells(RowCnt, ChkCol).Value = "" Then
Cells(RowCnt, ChkCol).EntireRow.Hidden = True
Else
Cells(RowCnt, ChkCol).EntireRow.Hidden = False
End If
Next RowCnt
End Sub
----------------------------------------------------
The problem is that it examines row by row and it takes very long since the values on the columns keep changing depending on a formula.
Is there a way to examine all rows at the same time and hide/unhide them in a second. Or at the same rate that the data updates?
-----------------------------------------------------------
Sub HideRows()
BeginRow = 11
EndRow = 59
ChkCol = 3
For RowCnt = BeginRow To EndRow
If Cells(RowCnt, ChkCol).Value = "" Then
Cells(RowCnt, ChkCol).EntireRow.Hidden = True
Else
Cells(RowCnt, ChkCol).EntireRow.Hidden = False
End If
Next RowCnt
End Sub
----------------------------------------------------