Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
vlookup shows result one cell above the expected result | Excel Worksheet Functions | |||
excel result return wrong calcuation result | Excel Worksheet Functions | |||
excel result return wrong calcuation result | Excel Worksheet Functions | |||
Advanced formula - Return result & Show Cell Reference of result | Excel Worksheet Functions | |||
vlookup based on random result returns incorrect result | Excel Worksheet Functions |