+ Reply to Thread
Results 1 to 4 of 4

Calculating numbers within number?

  1. #1
    Registered User
    Join Date
    03-21-2013
    Location
    montreal, canada
    MS-Off Ver
    Excel 2011
    Posts
    4

    Calculating numbers within number?

    I am not a new Excel user, but this has me stumped! I need to copy a number into a cell (eg 12345678 will be pasted into A2), and I would like each number to be extracted into its own cell (eg A1 would contain 1, B1 would contain 2, C1....etc). So obviously my question is how to I get the cells where I want the individual numbers to end up to extract the appropriate number from A2?

    OR, is there a way to add certain numbers within my A2 cell, like the 1+3+5+7?

    Thanks so much!
    Phil

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Calculating numbers within number?

    If the ultimate goal is to sum the individual digits in A2, try this

    =SUMPRODUCT(MID(A2,ROW(A1:INDEX(A:A,LEN(A2))),1)+0)

    DO NOT Change the references I highlighted in Red, they have no relation to the value you are evaluating.

  3. #3
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Calculating numbers within number?

    Or if you're wanting specific digits (you said 1 3 5 7)

    This will sum the 1st 3rd 5th and 7th digit..Not necessarily the 1 3 5 and 7.
    If the number is say
    52908137
    Then it would be 5+9+8+3

    =SUMPRODUCT(MID(A2,{1,3,5,7},1)+0)

  4. #4
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Calculating numbers within number?

    Hi pthomas77

    Put this in A1 and copy across:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Regards Kevin


    Merged Cells (They are the work of the devil!!!)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1