J
Jonas Haettner
Hi!
Why doesn't Sub ERROR work (se below)? I use the same
syntax.
What I really want to do is to find the fastest way of
hide rows in a column that meets a condition. The ultimate
would be to hide every row in one operation instead of
using a loop.
Sub OK()
Do While lRow < lEndRow
If Cells(lRow, 1) <> "Red" Then
Rows(lRow).EntireRow.Hidden = True
End If
lRow = lRow + 1
Loop
End Sub
Sub ERROR()
For Each c In [A1:A1000]
If c.Value Like "Red" Then
Rows(c.Row).EntireRow.Hidden = True
End If
Next
End Sub
/jonas
Why doesn't Sub ERROR work (se below)? I use the same
syntax.
What I really want to do is to find the fastest way of
hide rows in a column that meets a condition. The ultimate
would be to hide every row in one operation instead of
using a loop.
Sub OK()
Do While lRow < lEndRow
If Cells(lRow, 1) <> "Red" Then
Rows(lRow).EntireRow.Hidden = True
End If
lRow = lRow + 1
Loop
End Sub
Sub ERROR()
For Each c In [A1:A1000]
If c.Value Like "Red" Then
Rows(c.Row).EntireRow.Hidden = True
End If
Next
End Sub
/jonas