+ Reply to Thread
Results 1 to 7 of 7

Combining Sumproduct Result for Three or More Cells

  1. #1
    Forum Contributor
    Join Date
    05-14-2011
    Location
    London, England
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    120

    Combining Sumproduct Result for Three or More Cells

    Hi All,

    Please I need help with SUMPRODUCT formula.

    I am trying to calculate Income tax for each category of employees and then add the results up to get a TOTAL income tax for all employees.

    Here is the calculation for each category of employees, using sumproduct. Each of them gives the correct tax payable for each category:

    a) Income Tax for Owner – Annual Salary is in Cell R8:
    =SUMPRODUCT(--(R8>{10600;31785;150000}), (R8-{10600;31785;150000}), {0.2;0.2;0.05})

    b) Income tax for Permenent Staff – Annual Salary is in Cell R9:
    =SUMPRODUCT(--(R9>{10600;31785;150000}), (R9-{10600;31785;150000}), {0.2;0.2;0.05})

    c) Income tax for Part-time Staff – Annual Salary is in Cell R10:
    =SUMPRODUCT(--(R10>{10600;31785;150000}), (R10-{10600;31785;150000}), {0.2;0.2;0.05})

    1.My problem is how to combine all the three formulas into one formula by including the cell references into one formula.

    2.As you can see, apart from the cell numbers (R8, R9, R10), every other thing in the formula is the same for each of the groups.

    3.If I have to get a combined PAYE total for all the staff, I am tempted to combine all the three formulas with a ‘plus’ as follows:

    =SUMPRODUCT(--(R8>{10600;31785;150000}), (R8-{10600;31785;150000}), {0.2;0.2;0.05})+ SUMPRODUCT(--(R9>{10600;31785;150000}), (R9-{10600;31785;150000}), {0.2;0.2;0.05})+ SUMPRODUCT(--(R10>{10600;31785;150000}), (R10-{10600;31785;150000}), {0.2;0.2;0.05})

    4.Please, how can I summarise the formula by and make it shorter by grouping the cell numbers together with just one set of formula without making it as long as it is above?

    5.I have tried something (see below) but I can’t get it to work correctly:

    =SUMPRODUCT(--(R8;R9;R10)>{10600;31785;150000}), (R8;R9;R10)-{10600;31785;150000}), {0.2;0.2;0.05})

    Please kindly help.

    Thank you.

    Buddy8

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,463

    Re: Combining Sumproduct Result for Three or More Cells

    Try:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Or possibly:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Both untested. Suggest you post a sample workbook if that doesn't work so that potential solutions can be tested.


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


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

    Re: Combining Sumproduct Result for Three or More Cells

    If you already have the 3 separate formulas, why not just add the results?
    =SUM(A1:A3)

    Where each of the previous formulas are in A1 A2 and A3

  4. #4
    Forum Contributor
    Join Date
    05-14-2011
    Location
    London, England
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    120

    Re: Combining Sumproduct Result for Three or More Cells

    Hi TMS,

    Thanks for your kind response.

    I have tried the two versions of the SUMPRODUCT formula that you kindly provided. Unfortunately, none of them provided the desired result.

    I have therefore attached a sample workbook that clearly demonstrates what I need.

    As can be seen from the attached workbook, if I apply the SUMPRODUCT formula separately for each of the salary categories, each of them produces the correct PAYE tax calculation as shown in Cells B14 to B16, giving a total tax of £13,103 as shown in B17.

    However, instead of calculating them separately, I would like to use just one formula in any one cell, in which B5, B6 and B7 are referenced, with the rest of the formula remaining the same, so as to produce the same result of £13,103.

    I look forward to some help with this. Thanks for everything.

    Buddy8
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    05-14-2011
    Location
    London, England
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    120

    Re: Combining Sumproduct Result for Three or More Cells

    Hi Junmo1,

    Thanks for your kind response. Please see my response (Post #4) to TMS. I do not wish to do the calculations separately and then add the results up as you suggested. I am looking for a way to combine the formula in just one cell to get the desired result.

    Thanks.

    Buddy8

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,209

    Re: Combining Sumproduct Result for Three or More Cells

    I think you only left with adding the SUMPRODUCTS because of the nature of the calculation.
    Last edited by JohnTopley; 01-26-2016 at 04:17 AM.

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

    Re: Combining Sumproduct Result for Three or More Cells

    Quote Originally Posted by Buddy8 View Post
    I am looking for a way to combine the formula in just one cell to get the desired result.
    But Why?

    1. Splitting calcuations into multiple cells (using helper cells) is NOT a bad thing.
    Excel gives you 1048576 rows and 16384 columns, that's 17,179,869,184 cells, in just one sheet.
    Might as well use a few of them.

    2. It seems very unlikely to me that any reporting type of sheet that has information broken into categories to begin with, would need to summarize the TOTAL, but not each individual category as well.

+ 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] Combining Two Results into One Result
    By juriemagic in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-31-2014, 04:26 AM
  2. Replies: 8
    Last Post: 11-23-2012, 10:58 AM
  3. [SOLVED] Combining two formulas to get one result
    By jaycee66 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-24-2012, 06:47 PM
  4. [SOLVED] Combining vertical cells into one and between blank rows start combining again?
    By mike_m1 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 08-21-2012, 12:19 PM
  5. [SOLVED] Problems combining IF and MAX to get the right result
    By Doctorchuckles in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 07-31-2012, 10:38 AM
  6. Replies: 2
    Last Post: 10-20-2011, 05:41 AM
  7. Combining AND,SUMPRODUCT & IF
    By reggie1000 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-14-2008, 09:35 AM

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