Having trouble with conditional formatting on IF formula result

FrumpyJones

New Member
Joined
Feb 11, 2008
Messages
43
I have the following formula that works fine to either give me a result or leave a cell blank if the value is zero:
=IF(SUM(OneTable[@[07/01/24]],TwoTable[@[07/01/24]],ThreeTable[@[07/01/24]],FourTable[@[07/01/24]])=0,"",(SUM(OneTable[@[07/01/24]],TwoTable[@[07/01/24]],ThreeTable[@[07/01/24]],FourTable[@[07/01/24]]))

At the bottom of the column I have it showing me the average of all cells which also works fine. For this example, let's say 6.33

I then wanted to do conditional formatting where if any cell in the column was Greater than the average, yellow fill it. Which works great UNTIL I get to the "null" items. It's filling them all with yellow.

I thought maybe put another rule after the first that had a simple formula of ="" no fill, but that did not work. Tried it above and below the first rule and with the "stop if true" checked and unchecked and changed nothing.

Guessing I'm missing something simple, which is why I come to you on bended knee for help.
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Do you want that "" value included as a value in the average, or is it considered a zero?
 
Upvote 0
Try this:

Book1
ABCDEFGHIJK
1
2CF ruleOneTableTwoTableThreeTableFourTable
3TRUE1578-88
4TRUE547201215
5FALSE3-12267
6FALSE-95-52-11
7TRUE1215-29-10
8TRUE1110-715-7
9FALSE-38-4-12-13-9
10FALSE -1-652
11FALSE-15-4-57-13
12TRUE2425710
136.33
14
Sheet2
Cell Formulas
RangeFormula
A3:A12A3=IF(B3<>"",B3>=$B$13)
B3:B12B3=IF(SUM(OneTable[@OneTable],TwoTable[@TwoTable],ThreeTable[@ThreeTable],FourTable[@FourTable])=0,"", SUM(OneTable[@OneTable],TwoTable[@TwoTable],ThreeTable[@ThreeTable],FourTable[@FourTable]))
B13B13=AVERAGE(B3:B12)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B3:B12Expression=IF(B3<>"",B3>=$B$13)textNO
 
Upvote 1
Solution
=IF(B3<>"",B3>=$B$13)
THANK YOU! That conditional format line did it. Maybe it's because it's Friday after 5PM, but I'm trying to assure I understand how its logic is working with my limited logic brain. So the first part is saying if b3 is anything other than "" then check if it's greater than (or equal to) the average, and if that 2nd part is true, use the fill, but if the first part is false, or if the 2nd part is false, do nothing. Do I have that right?
 
Upvote 0
Happy to help!

Sort of. Conditional Formatting rules only want a TRUE value.
IF the result of B3 <> "" is FALSE already, so there is nothing needed for the second argument of the IF statement.
Similarly, the Second B3>=$B$13 resolves to TRUE or FALSE, nothing else is needed.

To make it more visible you could actually use True and False values in the formula, but that would be just more work both you and excel would be doing, like this:
Excel Formula:
=IF(B3<>"",IF(B3>=$B$13,TRUE,FALSE),FALSE)

Best Wishes.
 
Upvote 1

Forum statistics

Threads
1,223,943
Messages
6,175,547
Members
452,652
Latest member
eduedu

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