Highlight Cell

B

Billy

I want to highlight cells in the if statement if they exceed the
criteria (>9). colorIndex doesn't seem to work with Cells. Is there
another way to do this or another command I can use?

thanks,

Dim NumRows As Integer
NumRows = Application.CountA(Columns(1))

MsgBox "Number of Rows " & NumRows

Dim Row As Integer
Row = 1

Do While Row <= NumRows

If Len(Cells(Row, 1).Value) > 9 Then
Cells(Row, 1).ColorIndex = 3
End If

Row = Row + 1
Loop


Billy Rogers
Dallas Texas

Currently using Excel 2003
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top