Hide rows with value "Hours"

  • Thread starter Thread starter jswilli1
  • Start date Start date
J

jswilli1

I would like to toggle rows to hide/unhide based on the value "Hours"
in column B. I think filtering is an issue to some blank seperator
rows and merged cell headings. There are no merged cells involving
Column B. Thanks.
 
Public Sub ProcessData()
Const TEST_COLUMN As String = "B" '<=== change to suit
Dim i As Long
Dim iLastRow As Long

With ActiveSheet

iLastRow = .Cells(.Rows.Count, TEST_COLUMN).End(xlUp).row

For i = 1 To iLastRow
.Rows(i).Hidden = .Cells(i, TEST_COLUMN).Value = "Hours"
Next i

End With

End Sub


--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)
 
Back
Top