Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Checkbox to change background color, font color and remove/ add bo | Excel Discussion (Misc queries) | |||
Conditional Format for font color using font color | Excel Worksheet Functions | |||
Changing Font color based on font type or size | Excel Discussion (Misc queries) | |||
fill color and font color icons do not work in excel | Excel Discussion (Misc queries) | |||
My fill color and font color do not work in Excel Std Edition 2003 | Excel Discussion (Misc queries) |