Changing font color based on type cell it is. How to do it?
How about something like this
Left(Target.Formula, 8) = "=VLOOKUP"
"Barb Reinhardt" wrote:
This will get you red font if it has no formula.
If Not Selection.HasFormula Then
Selection.Font.ColorIndex = 3
End If
It's tough to know what to suggest for the other. Maybe search for a
Parenthesis and format based on it's existance.
--
HTH,
Barb Reinhardt
If this post was helpful to you, please click YES below.
"Chet" wrote:
I want to change the font color on individual cells in a range based
on three different criteria.
1. A constant just entered as a number. (red font color)
2. A direct link where a cell has contents something like =A5 or
=Sheet2!B8 (green font color)
3. Any other type of formula such as =vlookup(a4,b4:b9,2,0). I
realize that this item is probably a subset of #2 but I am trying to
change the font color on something like this and make it different
than #2. (and different than #1) (blue font color) So direct link
cells are excluded from this group.
Thanks,
Chet
|