#1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 1
Default font color

I want result of this formula=if(x=y,"ok","not ok") be "ok" in green font and
"not ok" in red font. how can I write this formula?

  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 506
Default font color

Your query is not clear. I can take it in two ways.

1) Whether do you want to compare X column Cell with Y Column cells
OR
2) If X1 cell is equal to the text character of Y then do you want to get
the result as Ok otherwise not ok like that.

Anyway providing you the both methods below:-

Assumption 1:-
If you want to Compare X1 cell with Y1 cell and derive the result as ok and
not ok then use try the below:-
Paste this formula Z1 cell.
=IF(X1=Y1,"OK","NOT OK")
Place the Cursor in Z1 cell and hit Cntrl+Spacebar now the Total Z Column
will be selected, keep in mind that the active cell should be Z1 (Active cell
will have a white background after selection also).
Now goto FormatConditional Formatting For Condition1Select 'Formula
Is' Paste the below formula
=$X1=$Y1
Click Format and set the Font colour as Green and background as per your
desire give Ok.
For Condition2Select 'Formula Is' Paste the below formula
=$X1<$Y1
Click Format and set the Font colour as Red and background as per your
desire give Ok.

Assumption 2:-
If you want to get Ok and Not Ok if the X1 cell value is Y, then try the
below.
Paste this formula Z1 cell.
=IF(X1="Y","OK","NOT OK")
Place the Cursor in Y1 cell and hit Cntrl+Spacebar now the Total Y Column
will be selected, keep in mind that the active cell should be Y1 (Active cell
will have a white background after selection also).
Now goto FormatConditional Formatting For Condition1Select 'Formula
Is' Paste the below formula
=$X1="Y"
Click Format and set the Font colour as Green and background as per your
desire give Ok.
For Condition2Select 'Formula Is' Paste the below formula
=$X1<"Y"
Click Format and set the Font colour as Red and background as per your
desire give Ok.

Remember to Click Yes, if this post helps!

--------------------
(Ms-Exl-Learner)
--------------------


"sapro" wrote:

I want result of this formula=if(x=y,"ok","not ok") be "ok" in green font and
"not ok" in red font. how can I write this formula?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Checkbox to change background color, font color and remove/ add bo Sara Excel Discussion (Misc queries) 2 May 1st 23 11:43 AM
Conditional Format for font color using font color Jim Excel Worksheet Functions 2 August 29th 09 11:54 AM
Changing Font color based on font type or size John Excel Discussion (Misc queries) 2 February 7th 08 12:50 AM
fill color and font color icons do not work in excel huer59 Excel Discussion (Misc queries) 0 November 29th 07 01:06 PM
My fill color and font color do not work in Excel Std Edition 2003 chapstick Excel Discussion (Misc queries) 1 September 11th 05 08:48 PM


All times are GMT +1. The time now is 10:16 PM.

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

About Us

"It's about Microsoft Excel"