HotNumbers
Well-known Member
- Joined
- Feb 14, 2005
- Messages
- 728
I need a quick way to hide rows based on cell value in a column without using a loop. my current code is a loop and is too slow. PLEASE HELP
Column C is my range and if a cell value has a "x" then i need that row hidden. Here is my current code...
''''Hides Rows
For Each WS In ThisWorkbook.Worksheets
WS.Rows("1:2500").EntireRow.Hidden = False
Dim cp As Range
Dim a As Integer
For a = 1 To 2500
WS.Cells(a, 3).EntireRow.Hidden = WS.Cells(a, 3).Value = "x"
Next a
Next WS
Column C is my range and if a cell value has a "x" then i need that row hidden. Here is my current code...
''''Hides Rows
For Each WS In ThisWorkbook.Worksheets
WS.Rows("1:2500").EntireRow.Hidden = False
Dim cp As Range
Dim a As Integer
For a = 1 To 2500
WS.Cells(a, 3).EntireRow.Hidden = WS.Cells(a, 3).Value = "x"
Next a
Next WS