ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Excel not always summing correctly (https://www.excelbanter.com/excel-worksheet-functions/36942-excel-not-always-summing-correctly.html)

Watercolor artist

Excel not always summing correctly
 
I have a cell (k3) with this formula: =sum(h3:j3). The sum is not correct;
however, when I enter in K3 this formula, =h3+i3+j3, it works. Is this a bug
in Excel? (I'm using Excel 2003.)

Bernie Deitrick

SUM will only sum actual numbers, while the = + + construction will convert any strings that look
like numbers into numbers prior to adding.

So, my guess is that one of your "numbers" is actually a string, either entered in a cell that was
formatted as text, returned as a string from a formula, or entered with a leading single quote.

You can change the SUM formula to

=SUM(H3:J3*1)

entered using Ctrl-Shift-Enter, or use

=SUMPRODUCT(H3:J3*1)

HTH,
Bernie
MS Excel MVP


"Watercolor artist" wrote in message
...
I have a cell (k3) with this formula: =sum(h3:j3). The sum is not correct;
however, when I enter in K3 this formula, =h3+i3+j3, it works. Is this a bug
in Excel? (I'm using Excel 2003.)





All times are GMT +1. The time now is 09:05 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com