Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default how do I total the value of the cell to a single value, 37=3+7=10

Is there a function like substring in excel or something similar like that.
I would like to add all the digits in a cell to a single value, how would I
do that?

Thank you very much,

huong
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 586
Default how do I total the value of the cell to a single value, 37=3+7=10

click the cell and type an equal sign then a number then a plus sign, like so

=5+5+4+3
cell should equal 17

--
Cheers,
Ryan


"huong" wrote:

Is there a function like substring in excel or something similar like that.
I would like to add all the digits in a cell to a single value, how would I
do that?

Thank you very much,

huong

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 915
Default how do I total the value of the cell to a single value, 37=3+7=10

huong wrote:
Is there a function like substring in excel or something similar like that.
I would like to add all the digits in a cell to a single value, how would I
do that?

Thank you very much,


Hello huong,

There is a MID function (see F1), but you would have to write two
stand-alone MIDs (or more, depending on the length of your input) to
accomplish what you want.

The following works for any reasonable length of input. It is an array
formula, so you must press Ctrl+Shift+Enter to commit:

=SUM(VALUE(MID(A1,ROW(INDIRECT("x1:x"&LEN(A1))),1) ))

(Idea stolen from Pete_UK -- all props to him!)
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default how do I total the value of the cell to a single value, 37=3+7=10

=SUMPRODUCT(--MID($A$1,ROW(INDIRECT("1:" & LEN($A$1))),1))

37 returns 10

123 returns 6


Gord Dibben MS Excel MVP

On Wed, 3 Sep 2008 16:12:09 -0700, huong
wrote:

Is there a function like substring in excel or something similar like that.
I would like to add all the digits in a cell to a single value, how would I
do that?

Thank you very much,

huong


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default how do I total the value of the cell to a single value, 37=3+7=10

Try this array-entered** formula...

=SUM(IF(ROW(1:99)<=LEN(A1),--MID(A1,ROW(1:99),1),""))

** Commit this formula with Ctrl+Shift+Enter, not just Enter by itself.

Note: If you enter your digits as text, the above formula will add up to the
first 99 digits. If you would want more than that, just change both 99's to
the same higher digit limit.

--
Rick (MVP - Excel)


"huong" wrote in message
...
Is there a function like substring in excel or something similar like
that.
I would like to add all the digits in a cell to a single value, how would
I
do that?

Thank you very much,

huong


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
Is there any way of calculating a running total within a single cell in a column Janev New Users to Excel 2 September 13th 06 01:22 PM
keeping a running total in a single cell shrtdawg73 Excel Worksheet Functions 10 August 23rd 06 12:17 AM
Adding a Single Cell total from Seperate sheets GccTxs Excel Worksheet Functions 3 October 3rd 05 11:57 AM
how do i set up a single cell continual entry in excel to total f. mike@swallow Excel Discussion (Misc queries) 1 December 7th 04 12:29 PM
how do i calculate a running total in a single cell in excel gt2475 Excel Programming 1 December 2nd 04 08:47 AM


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