+ Reply to Thread
Results 1 to 4 of 4

Wrapped SUMPRODUCT Function

  1. #1
    Forum Contributor
    Join Date
    10-09-2015
    Location
    Canada
    MS-Off Ver
    Office Home and Student 2021 for Mac
    Posts
    170

    Wrapped SUMPRODUCT Function

    Hi all,

    I'm working with a table of fractions whose values I'm trying to sum using the sumproduct feature.

    The "fractions" are being pulled from two different tables to track responses to a survey (how many we have/how many we need, so there's no real math going on in the actual formula, it's just referencing two tables and adding a "/" to create those "fractions")

    However, I would like to sum the numbers on either side of the "/" to create a total row (workbook attached) using:

    =SUMPRODUCT(--LEFT(A3:A7,1))&"/"&SUMPRODUCT(--RIGHT(A3:A7,2))

    This works in cell A8, as the numbers on the left side of the "/" are all one digit in length, however, in cell B8, it sort of starts to misbehave, as there is a mix of double and single digit numbers on the left side of the "/", so it's throwing back an error because I've specified a length of 2 characters.

    I'm wondering if there is a way to modify my existing formula so that it sums the numbers on the left side of the "/" regardless of length.

    Any suggestions would be greatly appreciated!

    Darko
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,720

    Re: Wrapped SUMPRODUCT Function

    Use this in A8:

    =SUMPRODUCT(--LEFT(A3:A7,FIND("/",A3:A7)-1))&"/"&SUMPRODUCT(--RIGHT(A3:A7,LEN(A3:A7)-FIND("/",A3:A7)))

    then copy into B8.

    Hope this helps.

    Pete

  3. #3
    Forum Contributor
    Join Date
    10-09-2015
    Location
    Canada
    MS-Off Ver
    Office Home and Student 2021 for Mac
    Posts
    170

    Re: Wrapped SUMPRODUCT Function

    Quote Originally Posted by Pete_UK View Post
    Use this in A8:

    =SUMPRODUCT(--LEFT(A3:A7,FIND("/",A3:A7)-1))&"/"&SUMPRODUCT(--RIGHT(A3:A7,LEN(A3:A7)-FIND("/",A3:A7)))

    then copy into B8.

    Hope this helps.

    Pete
    Thanks Pete, worked like a charm!

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,720

    Re: Wrapped SUMPRODUCT Function

    You're welcome, and thanks for the rep, but you don't need to quote whole posts if you are responding directly - use the "Reply" button, rather than "Reply with Quote".

    If that takes care of your original question, please take a moment to select Thread Tools from the menu above and to the right of your first post in this thread, and mark this thread as SOLVED.

    Pete

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Sumif wrapped in sumproduct wildcard issue
    By NotSwank in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 01-17-2018, 11:02 AM
  2. if cell is wrapped with IFERROR function, then delete the function from the cell
    By Shishek in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-20-2012, 07:21 PM
  3. Replies: 9
    Last Post: 07-02-2012, 07:02 PM
  4. Replies: 7
    Last Post: 10-10-2010, 02:02 PM
  5. wrapped text?
    By tregrad in forum Excel General
    Replies: 4
    Last Post: 12-12-2009, 04:23 PM
  6. [SOLVED] wrapped text does not display
    By Erik in forum Excel General
    Replies: 6
    Last Post: 02-21-2006, 06:10 PM
  7. [SOLVED] SUMIF Function Inside SUMPRODUCT Function
    By Abdul Waheed in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 09-19-2005, 12:05 PM

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