conditional formatting cell that are not zero (with exception)

TheUnconquered

New Member
Joined
May 9, 2013
Messages
29
Office Version
  1. 2021
Platform
  1. Windows
Hello,

I have a conditional format set up right now that works most of the time for my purpose, but not all the time. How it's set up now, is if the cell is less than or more than zero it formats the cell red. The problem I have is sometimes there is very small numbers showing up in the output of the formula (like 0.00000001, for example). I don't need it to match that perfectly to zero. If it's off by a $1, fine, it can show as red. If it's off by less than a $1, I don't need to know that. How can I set this up in conditional formatting?
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Test for a value of abs(X) < 0.01, where X is the cell you are testing and the value 0.01 is sufficiently small that you consider it to be zero.
 
Upvote 0
I'm not following... I was thinking there would be a formula I could use within the conditional formatting rules that would make this work, but I don't know how to set that formula up.
 
Upvote 0
Use two conditional formulas for the cell:

one for Checking less than a value that you deem acceptable ie < -.99999999

then set another one for the cell to check greater than a value that you deem acceptable ie. > .99999999
 
Upvote 0
Solution
Use two conditional formulas for the cell:

one for Checking less than a value that you deem acceptable ie < -.99999999

then set another one for the cell to check greater than a value that you deem acceptable ie. > .99999999
Yes, of course. Easy solution. I should've thought of this. Guess I've been staring at this spreadsheet for too long today. ?‍♂️ Thank you!
 
Upvote 0
Whilst that will work, you can do it with a single CF condition, along the lines suggested by @dcardno

21 08 02.xlsm
B
1Value
20.0000001
30.5
40.00000001
525000
6-35
7-0.000000001
CF Away from Zero
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B2:B7Expression=ABS(B2)>0.000001textNO
 
Upvote 0
Whilst that will work, you can do it with a single CF condition, along the lines suggested by @dcardno

21 08 02.xlsm
B
1Value
20.0000001
30.5
40.00000001
525000
6-35
7-0.000000001
CF Away from Zero
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B2:B7Expression=ABS(B2)>0.000001textNO
Ok, I see what he was referring to now. This makes sense also. A way to do it with a single CF formula. Great! Thank you.
 
Upvote 0

Forum statistics

Threads
1,214,947
Messages
6,122,411
Members
449,081
Latest member
JAMES KECULAH

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