Thread: Highlght rows
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Alan M Alan M is offline
external usenet poster
 
Posts: 69
Default Highlght rows

I have a column containing a collection of various numbers. I need to use
code to highlight the rows containing the number 5.

I have tried with this but it does not work.

For Each Cell In Columns(2)

If Cell.Value = "5" Then
EntireRow.Select

With Selection.Interior
.ColorIndex = 15
.Pattern = xlSolid
End With
End If

Not sure why....Help please?