Try this...
Private Sub Worksheet_Change(ByVal Target As Range)
Select Case Target.Value
Case "Paid off"
Target.EntireRow.Interior.Color = vbYellow
Case "Missing"
Target.EntireRow.Interior.Color = vbRed
Case "Other"
Target.EntireRow.Interior.Color = vbMagenta
Case Else
Target.EntireRow.Interior.ColorIndex = xlColorIndexAutomatic
End Select
End Sub
Note that except for the Case Else and the code line under it, this is the
same code as RadarEye posted... I simply removed the "join multiple code
lines" symbol (the colon) and physically split the joined lines into
separate lines (which is my personal preference).
--
Rick (MVP - Excel)
Hai Maggie,
For starters VBA has 8 shorthand colors
vbBlack
vbRed
vbGreen
vbYellow
vbBlue
vbMagenta
vbCyan
vbWhite
Next to this you can use a colorindex.
To come back to your question:
Copy the macro below into the macropar of the sheet where you want the
colorchanging occur
Private Sub Worksheet_Change(ByVal Target As Range)
Select Case Target.Value
Case "Paid off": Target.EntireRow.Interior.Color = vbYellow
Case "Missing": Target.EntireRow.Interior.Color = vbRed
Case "Other": Target.EntireRow.Interior.Color = vbMagenta
End Select
End Sub
HTH,
Wouter
Thanks, that worked perfect, but if I accidently put in Paid Off I
have to manually change the fill is there a way when I delete the
entry, it will put the fill back to original?