Ottsel
Board Regular
- Joined
- Jun 4, 2022
- Messages
- 174
- Office Version
- 365
- Platform
- Windows
I have a set range from row 4 to row 696.
I attempted this, but was unsuccessful:
I've found in my workbook selecting the cells instead of hiding each one individually speeds up the process.
Originally I was using this, but again - it takes a long time to process:
Overall, I want to select all the rows at once, then with the selection hide it.
Any tips, tricks or ideas are greatly appreciated!
I attempted this, but was unsuccessful:
VBA Code:
StartRow = 4
EndRow = 696
ColNum = 25
For i = StartRow To EndRow
If Cells(i, ColNum).Value <> "1" Then
Cells(i, ColNum).EntireRow.Select
End If
Next i
Selection.EntireRow.Hidden = True
I've found in my workbook selecting the cells instead of hiding each one individually speeds up the process.
Originally I was using this, but again - it takes a long time to process:
VBA Code:
StartRow = 4
EndRow = 696
ColNum = 25
For i = StartRow To EndRow
If Cells(i, ColNum).Value = "1" Then
Cells(i, ColNum).EntireRow.Hidden = True
Else
Cells(i, ColNum).EntireRow.Hidden = False
End If
Next i
Overall, I want to select all the rows at once, then with the selection hide it.
Any tips, tricks or ideas are greatly appreciated!