Using Sum for database data

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a sql query that imports data from a MySQL database.
When the data is brought into Excel I can't sum the numbers.
 
Without all of the details, I'm guessing that the SUM equates to zero.

If that is true, the values may be text that appear to be numbers. Try this
to correct the problem:

1)Put a 1 in a blank cell and select that cell
2)Edit>Copy
3)Select the imported values
4)Edit>Paste Special
--Select Multiply
--Select Values
Click the [OK] button.

Does that resolve the problem?
 
Thanks, I found that to work but I also realized that it is better to change
the structure of table in the MySql database. I used decimal instead of
varchar.

jn

Ron Coderre said:
Without all of the details, I'm guessing that the SUM equates to zero.

If that is true, the values may be text that appear to be numbers. Try this
to correct the problem:

1)Put a 1 in a blank cell and select that cell
2)Edit>Copy
3)Select the imported values
4)Edit>Paste Special
--Select Multiply
--Select Values
Click the [OK] button.

Does that resolve the problem?

--
Regards,
Ron


jnorton said:
I have a sql query that imports data from a MySQL database.
When the data is brought into Excel I can't sum the numbers.
 
I have a similar problem - MySQL returns the field type 'decimal' and Excel
2003 does not recognise it as numbers!. I obviously can create a column with
a formula "=Value(TheCellWithTheDecimalNumber)" - but I want to analyse the
data with a pivot table directly.

Any hints?

Rainer

jnorton said:
Thanks, I found that to work but I also realized that it is better to change
the structure of table in the MySql database. I used decimal instead of
varchar.

jn

Ron Coderre said:
Without all of the details, I'm guessing that the SUM equates to zero.

If that is true, the values may be text that appear to be numbers. Try this
to correct the problem:

1)Put a 1 in a blank cell and select that cell
2)Edit>Copy
3)Select the imported values
4)Edit>Paste Special
--Select Multiply
--Select Values
Click the [OK] button.

Does that resolve the problem?

--
Regards,
Ron


jnorton said:
I have a sql query that imports data from a MySQL database.
When the data is brought into Excel I can't sum the numbers.
 
Back
Top