Color Question in Excel

  • Thread starter Thread starter John
  • Start date Start date
J

John

Say I have a spreadsheet with several columns and rows of data. Say
column G is a column that I enter a date when a "case" is closed. Can I
format the cell so that when a date is entered into column G12, for
example, the entire contents of row 12 turns another color, such as
red. What I'm looking for is a quick visual way to look at the
spreadsheet and tell which cases are closed vs open.

Thanks,

John
 
Right click on sheet tab>view code>insert this.
Now if you enter a date in column g below row 2 you get purple.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column <> 7 Or Target.Row < 3 Then Exit Sub
If IsDate(Target) Then _
Target.EntireRow.Interior.ColorIndex = 7
End Sub
 
Back
Top