A Microsoft Excel forum. ExcelBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » ExcelBanter forum » Excel Newsgroups » Excel Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

IF statement checking if a cell's text is red



 
 
Thread Tools Display Modes
  #1  
Old September 7th 07, 02:40 PM posted to microsoft.public.excel.worksheet.functions
Shazzer
external usenet poster
 
Posts: 18
Default IF statement checking if a cell's text is red

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
Ads
  #2  
Old September 7th 07, 03:03 PM posted to microsoft.public.excel.worksheet.functions
MartinW
external usenet poster
 
Posts: 860
Default IF statement checking if a cell's text is red

Hi Shazzer,

You may be able to adjust this to your needs.
http://xldynamic.com/source/xld.Colo...r.html#sorting

HTH
Martin


"Shazzer" > wrote in message
...
>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



  #3  
Old September 7th 07, 03:06 PM posted to microsoft.public.excel.worksheet.functions
RayportingMonkey
external usenet poster
 
Posts: 87
Default IF statement checking if a cell's text is red

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

  #4  
Old September 7th 07, 03:34 PM posted to microsoft.public.excel.worksheet.functions
Shazzer
external usenet poster
 
Posts: 18
Default IF statement checking if a cell's text is red

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

  #5  
Old September 7th 07, 03:53 PM posted to microsoft.public.excel.worksheet.functions
Jason[_6_]
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



  #6  
Old September 7th 07, 04:50 PM posted to microsoft.public.excel.worksheet.functions
Darren Bartrup
external usenet poster
 
Posts: 1
Default IF statement checking if a cell's text is red

Create a named range (Insert ~ Name ~ Define)

In the Define Name dialog box enter a name in the 'Names in workbook:' box
(e.g. RedCell).

In the 'Refers to:' box enter this formula:
=IF(GET.CELL(63,Sheet1!$A$1)=3,"Yes","No")

alternatively use:
=IF(GET.CELL(63,INDIRECT(ADDRESS(0,-1,4,FALSE),FALSE))=3,"Yes","No")

which will return Yes if the cell to the immediate left of the cell
containing the formula is red (change the 0 & -1 to refer to different
rows/columns).

Regards,
Darren.



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
If Statement Checking Formula NOT Value in a Cell Marathon Excel Discussion (Misc queries) 7 January 28th 07 10:31 PM
Can a cell's text order be ahead of a drawn item? xcelentform Excel Discussion (Misc queries) 0 July 26th 06 05:32 PM
VLOOKUP based on PART of another cell's text djDaemon Excel Discussion (Misc queries) 0 March 9th 06 01:08 PM
How do I use a cell's text, "A1", and put it in a formula? HighRiser Excel Worksheet Functions 1 July 6th 05 04:11 PM
How can I change a text to a cell's address? Antônio Sobral Excel Discussion (Misc queries) 0 February 15th 05 04:55 PM


All times are GMT +1. The time now is 10:07 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright ©2004-2014 ExcelBanter.
The comments are property of their posters.