Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]() i am trying to sum a number into single number? eg 1347 --- 25 please help |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
eg 1347 --- 25
Shouldn't that be 15? Biff "willie Loh" <willie wrote in message ... i am trying to sum a number into single number? eg 1347 --- 25 please help |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
eg 1347 --- 25
Shouldn't that be 15? A1 = 1347 =SUMPRODUCT(--MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1)) Returns 15 Biff "Biff" wrote in message ... eg 1347 --- 25 Shouldn't that be 15? Biff "willie Loh" <willie wrote in message ... i am trying to sum a number into single number? eg 1347 --- 25 please help |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I have seen the use of "--" in a few responses here and in other groups
but fail to understand what the 2 '--'s do or why they are necessary. I see that 1 - returns a negative, therefore 2 -'s return a positive, but why does + or nothing, that is "(MID(....") return 0? Can you explain? Thanks Biff wrote: eg 1347 --- 25 Shouldn't that be 15? A1 = 1347 =SUMPRODUCT(--MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1)) Returns 15 Biff "Biff" wrote in message ... eg 1347 --- 25 Shouldn't that be 15? Biff "willie Loh" <willie wrote in message ... i am trying to sum a number into single number? eg 1347 --- 25 please help |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
thks bro, it work.
"noyb" wrote: I have seen the use of "--" in a few responses here and in other groups but fail to understand what the 2 '--'s do or why they are necessary. I see that 1 - returns a negative, therefore 2 -'s return a positive, but why does + or nothing, that is "(MID(....") return 0? Can you explain? Thanks Biff wrote: eg 1347 --- 25 Shouldn't that be 15? A1 = 1347 =SUMPRODUCT(--MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1)) Returns 15 Biff "Biff" wrote in message ... eg 1347 --- 25 Shouldn't that be 15? Biff "willie Loh" <willie wrote in message ... i am trying to sum a number into single number? eg 1347 --- 25 please help |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
The -- is used when we want to convert textual values to their numeric
equivalent. In the above example, MID returns text. If it happens that the text represents a number, it can be used in numeric calculations if it is converted to a number. The same happens for values returning true or false: even though in an explicit calculation true=1 and false=0, if these values are found in an array and you want, e.g. SUM(A1:A10), and some of these cells contain true, it will be ignored instead of counting as 1. If you want to sum all these values, including T/F, you could use: =SUM(--A1:A10) but then you would have to array-enter it (Shift+Ctrl+Enter). HTH Kostis Vezerides |
#7
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Thanks
vezerid wrote: The -- is used when we want to convert textual values to their numeric equivalent. In the above example, MID returns text. If it happens that the text represents a number, it can be used in numeric calculations if it is converted to a number. The same happens for values returning true or false: even though in an explicit calculation true=1 and false=0, if these values are found in an array and you want, e.g. SUM(A1:A10), and some of these cells contain true, it will be ignored instead of counting as 1. If you want to sum all these values, including T/F, you could use: =SUM(--A1:A10) but then you would have to array-enter it (Shift+Ctrl+Enter). HTH Kostis Vezerides |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
why a reference to an empty cell is not considered empty | Excel Discussion (Misc queries) | |||
Adding a row to worksheet does not update cell references in another. | Excel Worksheet Functions | |||
Instead of a negative number, I'd like to show zero... | Excel Worksheet Functions | |||
Cell color based upon cell value | Excel Discussion (Misc queries) | |||
cell color index comparison | New Users to Excel |