Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
769 views
in Technique[技术] by (71.8m points)

excel - Sum of numbers + 0

I am having a problem with a small number. I am using SUM function to sum certain numbers. If I add a zero to the range, it is not displaying zero. I don't know why.

A1

=SUM(B1:R1)*-1

C1 to L1

266864  -100000 -15136.15   -23688.82   -120870 -7169   -5550   1224    -0.03   4326

A2

=SUM(B2:R2)*-1

C2 to M2

=SUM(C3:C3) =SUM(D3:D3) =SUM(E3:E3) =SUM(F3:F3) =SUM(G3:G3) =SUM(H3:H3) =SUM(I3:I3) =SUM(J3:J3) =SUM(K3:K3) =SUM(L3:L3) =SUM(M3:M3)

A3

=SUM(B3:R3)*-1

C3 to M3

266864  -100000 -15136.15   -23688.82   -120870 -7169   -5550   1224    -0.03   4326    0

A1 is displaying 0, but A2 and A3 displays 9.09E-13

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

The number 9.09E-13 is another way (scientific notation) of saying 0.000000000000909495, a very small decimal number. What you are experiencing is a 15 digit precision floating point error.

????Floating Point Error

Typically, you would use the ROUND function or something similar to remove the error (if you have to).

See Floating-point arithmetic may give inaccurate results in Excel for more information.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...