I want the text in cell b2 to be "fail" if its value is greater than the value in cell a1 and "pass" if it is less. Can I use the conditional formatting wizard for this?
TIA,
W.
On 2002-02-25 11:44, wking1976 wrote:
I want the text in cell b2 to be "fail" if its value is greater than the value in cell a1 and "pass" if it is less. Can I use the conditional formatting wizard for this?
TIA,
W.
Cond Format cannot compute a value like "Fail" or "Pass". However, you can highlight a cell or range of interest with color and other formatting features.
Have a look at conditional formatting under Help of Excel.
Edit- Hehe, every answer I give seems to be about a minute after someone else, must be getting old
Not to generate text, no, and the way you have it set up you will end up with a circular reference.
The best you can do with conditional formatting is to change the colour of the cell or font to reflect the 'pass' or 'fail'. To do this, click in B2, click on Format-Conditional Formatting and change Cell Value Is to Formula Is. Enter
=$A$1 > $B$2
and select your format (eg Red font). Click on Add>> and enter
=$A$1< $B$2
and choose another font colour (eg blue). HTH. This message was edited by Mudface on 2002-02-25 11:55
It's probably best to have some other cell (like B3) show the pass or fail. But if you
really want B2 to be Pass or Fail, then you
can put the following in the Worksheet_Calculate
code for the worksheet:
Private Sub Worksheet_Calculate()
If [F8].Value <= [E7].Value Then
[F8].NumberFormat = """Pass"""
Else
[F8].NumberFormat = """Fail"""
End If
End Sub
We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel
Which adblocker are you using?
Disable AdBlock
Follow these easy steps to disable AdBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the icon in the browser’s toolbar. 2)Click on the "Pause on this site" option.
Go back
Disable AdBlock Plus
Follow these easy steps to disable AdBlock Plus
1)Click on the icon in the browser’s toolbar. 2)Click on the toggle to disable it for "mrexcel.com".
Go back
Disable uBlock Origin
Follow these easy steps to disable uBlock Origin
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.
Go back
Disable uBlock
Follow these easy steps to disable uBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.