Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / October 2007

Tip: Looking for answers? Try searching our database.

Changing Font Colour

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mlv - 24 Oct 2007 15:39 GMT
Is there any way of changing the colour of the text in a cell when using an
'IF' statement?

I have a formula that looks at the status of a cell and then puts the
appropriate text into another cell.

I would like this text to be normally black (which it is by default), but
red if the IF statement is not satisfied.

Is this possible?  Is there some code that can be used to change the font
colour?

Thanks
Signature

Mike
-Please remove 'safetycatch' from email address before firing off your
reply-

Sandy Mann - 24 Oct 2007 15:43 GMT
Check out Formatting > Conditional formatting to do what you want.

Signature

HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

sandymann2@mailinator.com
Replace @mailinator.com with @tiscali.co.uk

> Is there any way of changing the colour of the text in a cell when using
> an 'IF' statement?
[quoted text clipped - 9 lines]
>
> Thanks
Gord Dibben - 24 Oct 2007 15:46 GMT
See help on Conditional Formatting.

Gord Dibben  MS Excel MVP

>Is there any way of changing the colour of the text in a cell when using an
>'IF' statement?
[quoted text clipped - 9 lines]
>
>Thanks
Bob I - 24 Oct 2007 15:47 GMT
On the cell that need to change color us Format, Conditional Formatting

> Is there any way of changing the colour of the text in a cell when using an
> 'IF' statement?
[quoted text clipped - 9 lines]
>
> Thanks
mlv - 24 Oct 2007 17:50 GMT
Everybody wrote:

> Use Conditional Formatting.

I've read the help files on Conditional Formatting, but I think I need
spoon-feeding on this one...

I can get Conditional Formatting to work fine on cells with a fixed value,
but I can't get it to work on the cell with the variable text that I want to
change to red.

Simple example - formula in cell:

=IF(Logical_Test,"Value is within set limits","Warning - value is outside of
set limits")

Normally the text colour is default black.  However, if the cell shows the
text "Warning - value is outside of set limits", I would like that text to
be red.

I guess I really only need to search for the keyword "Warning" within the
cell text.  I assume I need to use 'Formula is' rather than 'Cell Value is'
in the Conditional Formatting dialog box?

Can anyone help with the formula?

Thanks
Signature

Mike
-Please remove 'safetycatch' from email address before firing off your
reply-

Bob I - 24 Oct 2007 18:38 GMT
Cell Value is Equal to
="Warning - value is outside of set limits"

Pick pattern and the color red

> Everybody wrote:
>
[quoted text clipped - 23 lines]
>
> Thanks
mlv - 25 Oct 2007 08:50 GMT
Bob wrote:

> Cell Value is Equal to
> ="Warning - value is outside of set limits"

Thanks Bob.

Interestingly, that was the first thing I tried, but it didn't work for me.
It seems some pilot error crept in.

I didn't type the leading '=' sign because the Conditional Formatting
dialogue box seemed to put that in automatically.  I just entered the text
in quotation marks.

I've now spotted that not only is the '=' sign put in automatically, but so
are the quotation marks, so my entered text actually ended up as:

 =""Warning - value is outside of set limits""

Which is why it didn't work.

It works now  :-)

Another thing...

The actual 'Equal to' text line I have to match is much longer than the
example I gave in this post.  It exceeds the width of the text box field,
which is why I was hoping I could use a much shorter keyword search instead.

I can't find a way of navigating through the text line to check for errors.
Using the mouse cursor only works on text that is visible within the text
box field.  Using the arrow keys to scroll to text that extends beyond the
text box field doesn't work (for me).  Instead the arrow key inserts an
adjacent cell reference (such as +$B$52) into the text line.

So, what am I missing?  How do I scroll right to bring hidden text into
view?  I'm using Excel 2002 SP3.

I have just discovered that clicking on the icon to the right of the text
field extends the field to the full width of the dialogue box, but the
scroll problem persists if the text line is still longer than the extended
text box field.

Thanks
Signature

Mike
-Please remove 'safetycatch' from email address before firing off your
reply-

Bob I - 25 Oct 2007 13:51 GMT
If all you want to pick off, is a part of it, here is an example using
your example placed in B1 and checking the value in A1. CF on B1 is

Formula is  =MID(B1,1,7)="Warning"

and set it to red

> Bob wrote:
>
[quoted text clipped - 40 lines]
>
> Thanks
mlv - 26 Oct 2007 08:01 GMT
Bob wrote:

> If all you want to pick off, is a part of it, here is an example
> using your example placed in B1 and checking the value
[quoted text clipped - 3 lines]
>
> and set it to red

Thanks Bob
Signature

Mike
-Please remove 'safetycatch' from email address before firing off your
reply-

Bob I - 26 Oct 2007 14:39 GMT
> Bob wrote:
>
[quoted text clipped - 7 lines]
>
> Thanks Bob

You're welcome, have a good day!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.