hi,
I have a very large spreadsheet i'm running a script to hide rows given the value of a cell in a column.
Given its size the operation takes about 15-20 minutes to execute.

Sub HideRows()
    BeginRow = 6
    EndRow = 191
    ChkCol = 45 'column AS'

    For RowCnt = BeginRow To EndRow
            If Cells(RowCnt, ChkCol).Value = 1 Then
            Cells(RowCnt, ChkCol).EntireRow.Hidden = True
        End If
    Next RowCnt
End Sub
I think its taking too long because it's selecting the row, then hiding, and loops through until finished.

My Question: Would it be quicker to have a Sub run through making non-adjacent selections of the rows that qualify then do 1 Hide Row operation? And what would be the best way to do this? Have done some searching but cant find a way.

Cheers
Cam