ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Will add, won't sum? (https://www.excelbanter.com/excel-discussion-misc-queries/134794-will-add-wont-sum.html)

dlw

Will add, won't sum?
 
I copied some numbers from an Access query into an Excel 2000 spreadsheet.
When you sum them, it comes up 0, when you just add them, it works. For
example =(a1+a2) gives the right answer, =sum(a1.a2) gives 0.
What causes that?

Don Guillett

Will add, won't sum?
 
My USA syntax for a range is a colon instead of a period.

--
Don Guillett
SalesAid Software

"dlw" wrote in message
...
I copied some numbers from an Access query into an Excel 2000 spreadsheet.
When you sum them, it comes up 0, when you just add them, it works. For
example =(a1+a2) gives the right answer, =sum(a1.a2) gives 0.
What causes that?




RichardSchollar[_2_]

Will add, won't sum?
 
Hi

Excel is recognising the cells as Text rather than as numeric values -
the addition operator coerces Excel to recognise the numbers as
genuine numerics and hence this works. Sum on the other hand ignores
text (ie so no coeceion takes place). Potentially you can convert
these 'numbers' back to text by selecting the entire column and going
DataTextToColumns and clicking Finish.

Hope this helps!

Richard


On 14 Mar, 14:06, dlw wrote:
I copied some numbers from an Access query into an Excel 2000 spreadsheet.
When you sum them, it comes up 0, when you just add them, it works. For
example =(a1+a2) gives the right answer, =sum(a1.a2) gives 0.
What causes that?




Teethless mama

Will add, won't sum?
 
Your data are Text value so it won't work with =SUM(A1:A2)
you can get around with Sum function with this =SUM(--A1,--A2)


"dlw" wrote:

I copied some numbers from an Access query into an Excel 2000 spreadsheet.
When you sum them, it comes up 0, when you just add them, it works. For
example =(a1+a2) gives the right answer, =sum(a1.a2) gives 0.
What causes that?


dlw

Will add, won't sum?
 
Yes, they were text, it was throwing me off, because in addition to adding
them, it also formatted this "text" as currency and numbers with 0 decimal
places.
(very coercive)

"dlw" wrote:

I copied some numbers from an Access query into an Excel 2000 spreadsheet.
When you sum them, it comes up 0, when you just add them, it works. For
example =(a1+a2) gives the right answer, =sum(a1.a2) gives 0.
What causes that?


PCB

Will add, won't sum?
 
I had this same problem, but nothing I try will convert the "text" to
numbers. Any other ideas?

"dlw" wrote:

Yes, they were text, it was throwing me off, because in addition to adding
them, it also formatted this "text" as currency and numbers with 0 decimal
places.
(very coercive)

"dlw" wrote:

I copied some numbers from an Access query into an Excel 2000 spreadsheet.
When you sum them, it comes up 0, when you just add them, it works. For
example =(a1+a2) gives the right answer, =sum(a1.a2) gives 0.
What causes that?



All times are GMT +1. The time now is 02:13 AM.

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