SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Excel not recognising numbers
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

johnmitch38
Starting Member

United Kingdom
9 Posts

Posted - 10/31/2013 :  17:46:37  Show Profile  Reply with Quote
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

Malaysia
961 Posts

Posted - 10/31/2013 :  21:10:35  Show Profile  Reply with Quote
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

United Kingdom
9 Posts

Posted - 11/01/2013 :  05:52:24  Show Profile  Reply with Quote
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

India
22754 Posts

Posted - 11/01/2013 :  06:53:46  Show Profile  Send madhivanan a Yahoo! Message  Reply with Quote
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

United Kingdom
9 Posts

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

JM
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000