+ Reply to Thread
Results 1 to 5 of 5

Sum first 'x' characters in range of cells

Hybrid View

Paul987 Sum first 'x' characters in... 09-02-2009, 10:17 AM
DonkeyOte Re: Sum first 'x' characters... 09-02-2009, 10:20 AM
Paul987 Re: Sum first 'x' characters... 09-02-2009, 10:48 AM
DonkeyOte Re: Sum first 'x' characters... 09-02-2009, 10:58 AM
masteff Re: Sum first 'x' characters... 09-02-2009, 02:56 PM
  1. #1
    Forum Contributor
    Join Date
    07-01-2005
    Posts
    103

    Sum first 'x' characters in range of cells

    I have a list of data in the following format:
    1,6
    10,66
    13,13

    I would like to divide the sum the values on the left of the comma and the sum of the values on the right of the comma.

    EX. (1+10+13)/(6+66+13) = 24/85 = .2823

    This formula will pull off the value on the left side of the comma in cell A1:

    =LEFT(A1,FIND(",",A1)-1))

    but I'm not sure how to use this formula to sume a range.
    Thanks,

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Sum first 'x' characters in range of cells

    one approach:

    =SUMPRODUCT(--LEFT(A1:A3,FIND(",",A1:A3)-1))/SUMPRODUCT(--MID(A1:A3,FIND(",",A1:A3)+1,100))

  3. #3
    Forum Contributor
    Join Date
    07-01-2005
    Posts
    103

    Re: Sum first 'x' characters in range of cells

    perfect. Any suggestions on where I can read up on what the "(--" part of the formula is doing? THanks for the help

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Sum first 'x' characters in range of cells

    see the link in my sig. to SUMPRODUCT.

  5. #5
    Forum Contributor
    Join Date
    08-11-2009
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    149

    Re: Sum first 'x' characters in range of cells

    Quote Originally Posted by Paul987 View Post
    perfect. Any suggestions on where I can read up on what the "(--" part of the formula is doing? THanks for the help
    You can also see the discussion here: http://www.excelforum.com/excel-work...-function.html

+ 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