Conflicting IFERROR and conditional formatting

blundastruck

New Member
Joined
Nov 24, 2015
Messages
7
I want a cell to:
1. Remove the "DIV/0" error when input cells are blank
2. When the output cell is above 9%, turn it red.

This is where I am:

1648048518996.png


With the above example, the output is empty but still turns red. I've tried to flip/flop the rules, but then the cell will not turn red above 9%.

I'm stumped. How do I resolve the conflict?
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
1. Remove the "DIV/0" error when input cells are blank
Usually, the best way to fix/remove that error is to address the formulas that cause them.

For example, if you have the formula:
Excel Formula:
=A1/B1
you would get that error whenever B1 is 0 or empty.

So, you could rewrite that formula like this:
Excel Formula:
=IF(B1<>0,A1/B1,"")
which will return a blank if B1 is blank or 0, otherwise it will do the division.
 
Upvote 0
Hi,

That's not what @Joe4 meant in Post # 2, he means for you to Fix the Original formula that put the #DIV/0! error in D4 in the first place, then you don't need to deal with the error in CF.
If you post the formula that's in D4, we can fix it for you, or you can just Wrap your current formula in IFERROR, like:

=IFERROR(your current formula,"")

But without doing that, you can use this for CF:

Book3.xlsx
D
4#DIV/0!
59.50%
65%
711%
Sheet1068
Cell Formulas
RangeFormula
D4D4=1/0
Cells with Conditional Formatting
CellConditionCell FormatStop If True
D4:D7Expression=IF(ISNUMBER(D4),D4>0.09,0)textNO
 
Upvote 0
Hi,

That's not what @Joe4 meant in Post # 2, he means for you to Fix the Original formula that put the #DIV/0! error in D4 in the first place, then you don't need to deal with the error in CF.
If you post the formula that's in D4, we can fix it for you, or you can just Wrap your current formula in IFERROR, like:

=IFERROR(your current formula,"")

But without doing that, you can use this for CF:

Book3.xlsx
D
4#DIV/0!
59.50%
65%
711%
Sheet1068
Cell Formulas
RangeFormula
D4D4=1/0
Cells with Conditional Formatting
CellConditionCell FormatStop If True
D4:D7Expression=IF(ISNUMBER(D4),D4>0.09,0)textNO
jtakw is spot on.
Rather than try to address the problem after the fact, it is better to prevent it from happening in the first place (and can usually be done so quite easily).
 
Upvote 0

Forum statistics

Threads
1,216,105
Messages
6,128,859
Members
449,472
Latest member
ebc9

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