Conditional Formating

Beneindias

Board Regular
Joined
Jun 21, 2022
Messages
97
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
Hey guys,

I´m having a strange problem with excel and hope that someone can help me.

So, I have an excel file with a table that compares prices.

In collumn S, I have the comparison between price that I paid and my selling price.

And I have conditional formating to change cell color in this row, depending on my margin.

So, I have 3 rules, value=0, color green, value>0, orange and values<0, colors red.
(I have the rules in this order)

The problem is, I have cells with value=0 that are green, others are orange and even red...

The cells with values >0 and <0 seem to be workin fine.

I've already changed order of rules, ticked off and on the "Stop if true" box, but it's always the same result.

Thanks to all who can help
 

Attachments

  • conditional_formating.jpg
    conditional_formating.jpg
    71.6 KB · Views: 4
  • S.jpg
    S.jpg
    31.5 KB · Views: 4

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Are the cells you are formatting calculations?
If so, you may have the famous "floating arithmetic" issue going on, as described here: Floating-point arithmetic may give inaccurate result in Excel - Office
I would recommend updating your calculations to use the ROUND function to round the numbers off to get rid of any tiny fractional differences.
 
Upvote 0
Solution
And that was the cause.

I've never heard of that before.
Thanks for the solution.
 
Upvote 0
And that was the cause.

I've never heard of that before.
Thanks for the solution.
You are welcome.
Yeah, it can be an annoying little quirk that rears its ugly head when you are trying to compare to exact values.
 
Upvote 0

Forum statistics

Threads
1,214,909
Messages
6,122,189
Members
449,072
Latest member
DW Draft

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