i am trying to sum a number into single number?
eg 1347 --- gt;gt; 25
please help
gt;eg 1347 --- gt;gt; 25
Shouldn't that be 15?
Biffquot;willie Lohquot; lt;willie gt; wrote in message
...
gt;
gt; i am trying to sum a number into single number?
gt;
gt; eg 1347 --- gt;gt; 25
gt;
gt; please help
gt;eg 1347 --- gt;gt; 25
gt;Shouldn't that be 15?
A1 = 1347
=SUMPRODUCT(--MID(A1,ROW(INDIRECT(quot;1:quot;amp;LEN(A1))),1))
Returns 15
Biff
quot;Biffquot; gt; wrote in message
...
gt; gt;eg 1347 --- gt;gt; 25
gt;
gt; Shouldn't that be 15?
gt;
gt; Biff
gt;
gt;
gt; quot;willie Lohquot; lt;willie gt; wrote in message
gt; ...
gt;gt;
gt;gt; i am trying to sum a number into single number?
gt;gt;
gt;gt; eg 1347 --- gt;gt; 25
gt;gt;
gt;gt; please help
gt;
gt;
I have seen the use of quot;--quot; 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 quot;(MID(....quot;) return 0?
Can you explain?
Thanks
Biff wrote:
gt;gt;eg 1347 --- gt;gt; 25
gt;
gt;
gt;gt;Shouldn't that be 15?
gt;
gt;
gt; A1 = 1347
gt;
gt; =SUMPRODUCT(--MID(A1,ROW(INDIRECT(quot;1:quot;amp;LEN(A1))),1))
gt;
gt; Returns 15
gt;
gt; Biff
gt;
gt; quot;Biffquot; gt; wrote in message
gt; ...
gt;
gt;gt;gt;eg 1347 --- gt;gt; 25
gt;gt;
gt;gt;Shouldn't that be 15?
gt;gt;
gt;gt;Biff
gt;gt;
gt;gt;
gt;gt;quot;willie Lohquot; lt;willie gt; wrote in message
...
gt;gt;
gt;gt;gt;i am trying to sum a number into single number?
gt;gt;gt;
gt;gt;gt;eg 1347 --- gt;gt; 25
gt;gt;gt;
gt;gt;gt;please help
gt;gt;
gt;gt;
gt;
gt;
thks bro, it work.
quot;noybquot; wrote:
gt; I have seen the use of quot;--quot; in a few responses here and in other groups
gt; but fail to understand what the 2 '--'s do or why they are necessary. I
gt; see that 1 - returns a negative, therefore 2 -'s return a positive, but
gt; why does or nothing, that is quot;(MID(....quot;) return 0?
gt; Can you explain?
gt; Thanks
gt;
gt; Biff wrote:
gt; gt;gt;eg 1347 --- gt;gt; 25
gt; gt;
gt; gt;
gt; gt;gt;Shouldn't that be 15?
gt; gt;
gt; gt;
gt; gt; A1 = 1347
gt; gt;
gt; gt; =SUMPRODUCT(--MID(A1,ROW(INDIRECT(quot;1:quot;amp;LEN(A1))),1))
gt; gt;
gt; gt; Returns 15
gt; gt;
gt; gt; Biff
gt; gt;
gt; gt; quot;Biffquot; gt; wrote in message
gt; gt; ...
gt; gt;
gt; gt;gt;gt;eg 1347 --- gt;gt; 25
gt; gt;gt;
gt; gt;gt;Shouldn't that be 15?
gt; gt;gt;
gt; gt;gt;Biff
gt; gt;gt;
gt; gt;gt;
gt; gt;gt;quot;willie Lohquot; lt;willie gt; wrote in message
gt; ...
gt; gt;gt;
gt; gt;gt;gt;i am trying to sum a number into single number?
gt; gt;gt;gt;
gt; gt;gt;gt;eg 1347 --- gt;gt; 25
gt; gt;gt;gt;
gt; gt;gt;gt;please help
gt; gt;gt;
gt; gt;gt;
gt; gt;
gt; gt;
gt;
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 VezeridesThanksvezerid wrote:
gt; The -- is used when we want to convert textual values to their numeric
gt; equivalent. In the above example, MID returns text. If it happens that
gt; the text represents a number, it can be used in numeric calculations if
gt; it is converted to a number. The same happens for values returning true
gt; or false: even though in an explicit calculation true=1 and false=0, if
gt; these values are found in an array and you want, e.g. SUM(A1:A10), and
gt; some of these cells contain true, it will be ignored instead of
gt; counting as 1. If you want to sum all these values, including T/F, you
gt; could use:
gt;
gt; =SUM(--A1:A10)
gt;
gt; but then you would have to array-enter it (Shift Ctrl Enter).
gt;
gt; HTH
gt; Kostis Vezerides
gt;
- Oct 18 Sat 2008 20:46
How to sum a cell?
close
全站熱搜
留言列表
發表留言