What am I missing (again)

welshgasman

Well-known Member
Joined
May 25, 2013
Messages
1,395
Office Version
  1. 2019
  2. 2007
Platform
  1. Windows
What is happening?

OK, fairly familiar with Excel.

I have a workbook and in column D I have a formula =IF(AE83=0,"NIL",AE83) for each relevant row.

AE83 has formula of =SUM(E83:AC83)

Basically I am summing the row. When AE is zero I want to show NIL in column D.

This works exactly as intended for most cells. I have conditional formatting to fill as Green for those that show NIL.

Two rows show 0 in column D and then show Red due to the CF.

I've copied cells showing NIL to those errant cells and it make no difference, hence this post.??

TIA

 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Sounds like those cells are not 0.00
Do you have formulae in the cells being summed?
With one of the problem cells try expanding the number of decimals being show to 15.
do you get something like 0.00000000000001
 
Upvote 0
Doh:crash:

Thank you Fluff
Why couldn't I think of that.?

I do have formula in the cells being summed, but only something like =159.99+230+325.98

One shows
[TABLE="width: 165"]
<tbody>[TR]
[TD="class: xl63, width: 165, align: right"]-0.00000000000012256862

and the other
[TABLE="width: 165"]
<tbody>[TR]
[TD="class: xl65, width: 165, align: right"]-0.00000000000001819031[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]


I am only using currency amounts, so have no idea as to why that is as it is, but now I have a clue I can dig deeper.

Many thanks again.
 
Upvote 0
One way round the problem is
=ROUND(SUM(E83:AC83),2)
 
Upvote 0
Yep, did that and now have Nil etc.

Still do not understand how values got to that accuracy, as I mentioned, there are only currency values in the rows.
 
Upvote 0
It's down to something called "Floating point precision"
A very simple example is


Excel 2013/2016
ABC
11.200000000000000001.100000000000000000.09999999999999990
Sheet2
Cell Formulas
RangeFormula
C1=A1-B1
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,289
Members
452,631
Latest member
a_potato

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