Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
willie Loh
 
Posts: n/a
Default How to sum a cell?


i am trying to sum a number into single number?

eg 1347 --- 25

please help
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default How to sum a cell?

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default How to sum a cell?

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
noyb
 
Posts: n/a
Default How to sum a cell?

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
willie Loh
 
Posts: n/a
Default How to sum a cell?

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
vezerid
 
Posts: n/a
Default How to sum a cell?

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
noyb
 
Posts: n/a
Default How to sum a cell?

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
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
why a reference to an empty cell is not considered empty Nicoscot Excel Discussion (Misc queries) 10 March 10th 06 05:36 AM
Adding a row to worksheet does not update cell references in another. blausen Excel Worksheet Functions 5 February 25th 06 09:14 PM
Instead of a negative number, I'd like to show zero... Dr. Darrell Excel Worksheet Functions 6 December 7th 05 08:21 PM
Cell color based upon cell value My View Excel Discussion (Misc queries) 11 July 6th 05 03:59 AM
cell color index comparison MINAL ZUNKE New Users to Excel 1 June 30th 05 07:11 AM


All times are GMT +1. The time now is 02:50 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"