Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Excel not recognising numbers

Author  Topic 

johnmitch38
Starting Member

9 Posts

Posted - 2013-10-31 : 17:46:37
I've got a SQL query returning data into MS Excel.

One of the columns returns numbers that I then have a SUMIF formula totalling.

However, when the numbers get to Excel, they are not recognised as numbers so my SUM doesn't work. Even if I format the cells as number, general or currency, the sum doesn't work.

Excel knows that there is something in the cell but doesn't treat it as a number in any way.

Can I include something in the SQL statement so that it forces the results to be a number?

JM

waterduck
Aged Yak Warrior

982 Posts

Posted - 2013-10-31 : 21:10:35
hi, can you help check
1. the file format is csv or (xls/xlsx)
2. the formula calculation is automatic or manual
Go to Top of Page

johnmitch38
Starting Member

9 Posts

Posted - 2013-11-01 : 05:52:24
The file is .xlsx and calculations are automatic.

Even if I just select two cells with numbers in, in the bottom right corner of Excel (i forget what you call that bar) it counts the cells ok but does not sum them.

Thanks,

JM
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2013-11-01 : 06:53:46
See if single quote is prefixed with your numbers. You need to delete it

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

johnmitch38
Starting Member

9 Posts

Posted - 2013-11-01 : 08:32:16
Hi, thanks for your help and apologies for not knowing but how do i check for that?

JM
Go to Top of Page
   

- Advertisement -