I have written a macro that I use on excel 2003. I am trying to change the color of specific cells in a certain range. What is happening is instead of changing the color of the cell the cell's color stays the same and I get a False instead of the value that is supposed to be in the cell.
Tom
Tom
Code:
'Set the color of high priority clients to red
For Each f In Worksheets("ClientProcessing").Range("A9:A" & intLastRow)
If f = "MSP" Then f.Offset(0, 0) = ActiveCell.Interior.ColorIndex = 3
If f = "SPN" Then f.Offset(0, 0) = ActiveCell.Interior.ColorIndex = 3
If f = "UCS" Then f.Offset(0, 0) = ActiveCell.Interior.ColorIndex = 3
If f = "BFP" Then f.Offset(0, 0) = ActiveCell.Interior.ColorIndex = 3
If f = "TFS" Then f.Offset(0, 0) = ActiveCell.Interior.ColorIndex = 3
If f = "BRA" Then f.Offset(0, 0) = ActiveCell.Interior.ColorIndex = 3
If f = "CAR" Then f.Offset(0, 0) = ActiveCell.Interior.ColorIndex = 3
If f = "CHI" Then f.Offset(0, 0) = ActiveCell.Interior.ColorIndex = 3
If f = "APP" Then f.Offset(0, 0) = ActiveCell.Interior.ColorIndex = 3
If f = "INR" Then f.Offset(0, 0) = ActiveCell.Interior.ColorIndex = 3
If f = "MLT" Then f.Offset(0, 0) = ActiveCell.Interior.ColorIndex = 3
If f = "NBA" Then f.Offset(0, 0) = ActiveCell.Interior.ColorIndex = 3
If f = "ROR" Then f.Offset(0, 0) = ActiveCell.Interior.ColorIndex = 3
If f = "MIA" Then f.Offset(0, 0) = ActiveCell.Interior.ColorIndex = 3
If f = "NDI" Then f.Offset(0, 0) = ActiveCell.Interior.ColorIndex = 3
If f = "PVR" Then f.Offset(0, 0) = ActiveCell.Interior.ColorIndex = 3
If f = "TRA" Then f.Offset(0, 0) = ActiveCell.Interior.ColorIndex = 3
If f = "VRA" Then f.Offset(0, 0) = ActiveCell.Interior.ColorIndex = 3
Next