Thread: Hide rows
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Patti[_5_] Patti[_5_] is offline
external usenet poster
 
Posts: 20
Default Hide rows

Can anyone explain to me why this doesn't work? I am trying to filter a
sheet so that I am only viewing rows that have a bolded cell anywhere in
columns E:H. The code is hiding all rows in the worksheet.

Sub test()

For Each rngCell In Intersect(ActiveSheet.UsedRange,
ActiveSheet.Columns("e:h"))
If rngCell.Font.Bold = False Then
rngCell.EntireRow.Hidden = True
End If
Next

End Sub

Thanks in advance.