Conditional formatting with formula

nibed32

New Member
Joined
Jun 5, 2014
Messages
13
To all of you doing a wonderful job at Mrexcel I ask this simple question :

I have a range (~100 cells in a column) that each has its own formula in CF but I'd like to check if there is at least one that is true.

I already tried the solution proposed by Mr. Pearson (Conditional Formatting) and the solution proposed by Mr. Philips (http://www.xldynamic.com/source/xld.CFConditions.html#isitmet) but neither would work because of the formula I use in the CF.

The way it works in my sheet, the data in the cells A12:A100 is compared to the data in cells B12:B100 or in the cells C12:C100 depending on the value of the cell A10. The formula I use in the CF is this one, but it is different for every cell :

=OR(AND($A$10="B";$A12>$B12);AND($A$10="C";$A12>$C12))

In a perfect world, if there is at least one cell whose formula is true, I'd like the cell A10 to be colored in red but I don't know how to do it.


Continue the great work you do here it's wonderful!
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
I think this is what you want.

You would have to replace the commas with semi colons as I see that is what you use. My settings are for commas. Confirm the formula with Control Shift Enter.

Code:
=OR(IF($A$10="B",IF($A$12:$A$100>$B$12:$B$100,1)),IF($A$10="C",IF($A$12:$A$100>$C12:$C$100,1)))
 
Upvote 0

Forum statistics

Threads
1,223,229
Messages
6,170,881
Members
452,364
Latest member
springate

We've detected that you are using an adblocker.

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.
Go back
Back
Top