I am having a problem changing the color of rows depending on if the cells in that row contain any writing. I am trying to do this formatting in VBA or if there are any suggestions that would be great.
Asked
Active
Viewed 246 times
2 Answers
0
Color is different between version Excel 2003
, Excel 2007
, Excel 2010
and Excel 2013
but this remains constant:
Sheets(“Sheet1”).Range(“A” & n & “:D” & m).Interior.ColorIndex = 3
3 -> Red

Rizier123
- 58,877
- 16
- 101
- 156

artis_meditari
- 68
- 3
-
Is that in the function window or in VBA and I am in 2007. Thank you for your help. – C noob Jun 25 '13 at 17:55
0
Going for the "or not" part of the Title and assuming (1) a row extends from ColumnA to ColumnZ inclusive (can be extended) (2) the formatting is to apply when any cell in the row is not populated (can be reversed) and (3) a populated cell may contain either text or number value (can be adjusted) then:
Select ColumnsA:Z, HOME > Styles - Conditional Formatting, New Rule..., Use a formula to determine which cells to format and Format values where this formula is true:
=COUNTA($A1:$Z1)=0
Format... and select formatting of choice, OK, OK.

pnuts
- 58,317
- 11
- 87
- 139