Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default sum() 0.00 result

A report was exported to Excel. When using =sum(start:end) on a numerical
column the result is 0.00. But if use =cell1+cell2+cell3 the result is okay.

Tried using format as numerical, currency, and accounting to no avail.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default sum() 0.00 result

It's because the numbers are seen as text due to the import/export, no
formatting will change that. A couple of ways, select an empty cell, format
the cell the same way you want all the imported numbers, copy the cell,
select all imported numbers and do editpaste special and select add.
You can also select the column(s), then do datatext to columns and click
finish

--
Regards,

Peo Sjoblom


"Doc d" wrote in message
...
A report was exported to Excel. When using =sum(start:end) on a numerical
column the result is 0.00. But if use =cell1+cell2+cell3 the result is
okay.

Tried using format as numerical, currency, and accounting to no avail.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,202
Default sum() 0.00 result

A report was exported to Excel. When using =sum(start:end)
on a numerical column the result is 0.00. But if use =cell1+cell2+cell3
the result is okay.


It's because the numbers are seen as text due to the
import/export, no formatting will change that.


I'm still too new with Excel to be sure of my answers; but, in my test with
numbers entered into cells as text, the following array formula

=SUM(--TEXT(A4:A8,"#."&REPT("#",15)))

entered using Ctrl+Shift+<Enter seemed to work. Obviously, if you knew a
maximum number of decimal places, you could dump the REPT function call and
simply specify it.

Rick

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,202
Default sum() 0.00 result

A report was exported to Excel. When using =sum(start:end)
on a numerical column the result is 0.00. But if use =cell1+cell2+cell3
the result is okay.


It's because the numbers are seen as text due to the
import/export, no formatting will change that.


I'm still too new with Excel to be sure of my answers; but, in my test
with numbers entered into cells as text, the following array formula

=SUM(--TEXT(A4:A8,"#."&REPT("#",15)))

entered using Ctrl+Shift+<Enter seemed to work. Obviously, if you knew a
maximum number of decimal places, you could dump the REPT function call
and simply specify it.


I was thinking... assuming I am right and the array formula I posted is a
valid solution to the problem, there is probably no reason to use the REPT
function call... simply specifying 15 # signs after the decimal point would
make more sense. I was originally going to try and add only as many # signs
as the longest decimal and then decided that wasn't necessary... then, in my
haste, I simply plopped in a 15 into the REPT function instead of thinking
about what that meant). So, for the record, the array formula I am proposing
is

=SUM(--TEXT(A4:A8, "#.###############"))

again, entered by using Ctrl+Shift+<Enter. Of course the above will fail if
the range of cells contains an empty cell. If you have to cater to that
possibility, it looks like this array formula could be used instead...

=SUM(--("0"&TEXT(A4:A8, "#.###############")))

again, entered by using Ctrl+Shift+<Enter.

Rick

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,202
Default sum() 0.00 result

Of course the above will fail if the range of cells contains an
empty cell. If you have to cater to that possibility, it looks
like this array formula could be used instead...

=SUM(--("0"&TEXT(A4:A8, "#.###############")))

again, entered by using Ctrl+Shift+<Enter.


Okay, sometimes I'm an idiot.<g There is no need to concatenate zero in
front of the TEXT function... we can just use its format string to do that
for us (and save six keystrokes in the process). Here is my **final**
version of the array formula...

=SUM(--TEXT(start:end, "0.###############"))

again, entered by using Ctrl+Shift+<Enter. (Also note reintroduction of
'start' and 'end' for the cells making up the range... in my last posting, I
accidentally left in my test range instead of generalizing the range.)

Rick



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,886
Default sum() 0.00 result

Hi Rick

Perhaps I'm missing something here, but wouldn't the array formula
{=SUM(--(start:end))}

achieve the desired result.

--
Regards

Roger Govier


"Rick Rothstein (MVP - VB)" wrote in
message ...
Of course the above will fail if the range of cells contains an
empty cell. If you have to cater to that possibility, it looks
like this array formula could be used instead...

=SUM(--("0"&TEXT(A4:A8, "#.###############")))

again, entered by using Ctrl+Shift+<Enter.


Okay, sometimes I'm an idiot.<g There is no need to concatenate zero
in front of the TEXT function... we can just use its format string to
do that for us (and save six keystrokes in the process). Here is my
**final** version of the array formula...

=SUM(--TEXT(start:end, "0.###############"))

again, entered by using Ctrl+Shift+<Enter. (Also note reintroduction
of 'start' and 'end' for the cells making up the range... in my last
posting, I accidentally left in my test range instead of generalizing
the range.)

Rick



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
vlookup shows result one cell above the expected result Marie Excel Worksheet Functions 7 November 14th 06 02:52 AM
excel result return wrong calcuation result garyww Excel Worksheet Functions 1 August 14th 06 11:14 AM
excel result return wrong calcuation result garyww Excel Worksheet Functions 0 August 14th 06 05:02 AM
Advanced formula - Return result & Show Cell Reference of result Irv Excel Worksheet Functions 7 May 6th 06 03:36 AM
vlookup based on random result returns incorrect result rickat Excel Worksheet Functions 1 December 6th 05 01:16 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"