View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jason[_6_] Jason[_6_] is offline
external usenet poster
 
Posts: 10
Default IF statement checking if a cell's text is red

I think you would have to make a new function. There's a built in
function that gives information about the target cell, CELL, but it
doesn't return the actual color of the text. I'm no expert, so this
example if really basic, but should work. Put the following text into
a module in the spreadsheet in which you want to use the function:

Function CheckRed(target As Range)

Application.Volatile
If target.Font.Color = 255 Then
CheckRed = "Yes"
Else
CheckRed = "No"
End If

End Function

In the cell that you would have put your IF statement, use this:

=CheckRed(A1)

Hope this helps.

On Sep 7, 9:34 am, Shazzer wrote:
The red cells have just been manually set.

"RayportingMonkey" wrote:
I would think that depends on the criteria you are using to turn the text
red... If you are using conditional formatting, then the IF statement would
mirror that of the conditional formatting.


What is the criteria you are using for the red text?


"Shazzer" wrote:


I want to say :-
IF the text in A1 is formatted Red then, "yes" else "no"


Is there any way I can do this?


Ta v much