Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google sheets - Subtraction giving unexpected results

I have the following sheet:

spreadsheet cells

Why does the difference of two cells with the same value (J7 & J8) not equal zero?

Here is an example spreadsheet.

like image 843
Dean Brundage Avatar asked May 30 '18 15:05

Dean Brundage


1 Answers

Switching to Format/Number/Scientific on that cell, you can see the leftover value:

scientific format

These rounding errors are clearly a regular thing. You can use a formula such as =E3-round(E3,2) to see them for any cell:

rounding remainders

Clearly, allowing for a small value in the conditional formatting would avoid the problem:

conditional formatting formula

like image 109
df778899 Avatar answered Oct 17 '22 13:10

df778899