I have a spreadsheet with the following data->
Wo# Description Need Date Start Date
1002 fix lights 1-10-2008 1-8-08
1003 change filters 2-5-2008 2-4-08
1004 move totes 2-6-08
1005 relamp 3-1-2008
1006 repair cord 3-5-08
I would like to color the cells that are missing dates "Yellow".
I did this with conditional formatting, (cell value is equal to ="")but every cell after row6 is blank, so my "C" and "D" column after my data ends all turn "Yellow".
I would like to end my conditional formatting at the last row that has data.
I need to use macros to build the conditional formatting.
Thanks,
tav
Wo# Description Need Date Start Date
1002 fix lights 1-10-2008 1-8-08
1003 change filters 2-5-2008 2-4-08
1004 move totes 2-6-08
1005 relamp 3-1-2008
1006 repair cord 3-5-08
I would like to color the cells that are missing dates "Yellow".
I did this with conditional formatting, (cell value is equal to ="")but every cell after row6 is blank, so my "C" and "D" column after my data ends all turn "Yellow".
I would like to end my conditional formatting at the last row that has data.
Code:
Sub emptyCells()
Columns("C:C").Select
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlEqual, _
Formula1:="="""""
Selection.FormatConditions(1).Interior.ColorIndex = 6
End Sub
Thanks,
tav