Highlight colored rows or columns in excel

  • Thread starter Thread starter sAMBEDAn kOIRALa
  • Start date Start date
S

sAMBEDAn kOIRALa

I need to select colored rows or columns in excel, I don't want to do
manually as it takes a lot of time. Does anyone know how to do it, any
macros that could do it?

Plz help

Rgds,
 
The code below will put selection on a colored row. Its done in Excel 2000.
I don't think that the 2007 version uses ColorIndex any more.

This macro assumes you will take some sort of action on the
selected/highlighted rows.

Sub Macro1()

For MyRow = 2 To 200
' select the row, columns A to H in rows 2 to 200, one at a time
Range("A" + CStr(MyRow) + ":H" + CStr(MyRow)).Select
' if the fill color is red, then exit
If Selection.Interior.ColorIndex = 3 Then
' take some action
End If
Next MyRow

End Sub



Dennis
 
Back
Top