ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Highlight Cell (https://www.excelbanter.com/excel-programming/423513-highlight-cell.html)

Billy[_7_]

Highlight Cell
 
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


All times are GMT +1. The time now is 03:09 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com