(Sort of a novice, so try to keep it at my level, if possible)
In my spreadsheet, I am comparing calculated results to an "acceptance
value." If the results meet the "acceptance value" I want the cell to
display "Passed." If not, I want the cell to display "Failed." Using the
IF() function, I have it working (see below).
What I would really like -- and this is just fluff -- is to have a cell with
the text "Passed" in green and a cell with the text "Failed" in red. So if
the IF statement is TRUE, I want the cell to display "Passed" in green;
otherwise, to display "Failed" in red.
Can I bring the format of the cell with it?
=IF(B25>=400,"Passed","Failed") --> This is how it is now.
=IF(B25>=400,B3,B4) --> This is what I want it to be, where B3 contains a
green "Passed" and B4 contains a red "Failed."
Thanks,
Craig
Pete_UK - 29 Sep 2006 21:32 GMT
Hi Craig,
Unfortunately a formula can only return a value, not a format.
However, you can achieve your effect by using Conditional Formatting on
the cell with the formula in. Select that cell, and click Format |
Conditional Formatting and a panel will pop up. In the first box,
select "Cell Value is", then in the next box choose "Equal to" from the
drop-down list, then in the third box type "Passed", then click on the
Format... button, select the Colour you want (one of the greens), then
click OK.
You can have up to 3 different conditional formats, so click the Add
button to set things up for "Failed" in the same way - this time you
would choose Red. Click OK again and this will give you what you want.
Hope this helps.
Pete
> (Sort of a novice, so try to keep it at my level, if possible)
>
[quoted text clipped - 17 lines]
> Thanks,
> Craig
Craig Williams - 29 Sep 2006 21:47 GMT
Pete,
Thanks for the help. That gives me exactly what I wanted.
Craig
> Hi Craig,
>
[quoted text clipped - 40 lines]
>> Thanks,
>> Craig
Pete_UK - 30 Sep 2006 00:01 GMT
Thanks for the feedback, Craig - glad to be of help.
Pete
> Pete,
>
[quoted text clipped - 46 lines]
> >> Thanks,
> >> Craig