+ Reply to Thread
Results 1 to 19 of 19

MAX of SUMPRODUCT Fields Match a RANGE of Criteria

  1. #1
    Registered User
    Join Date
    12-29-2020
    Location
    Viet Nam
    MS-Off Ver
    365
    Posts
    13

    Question MAX of SUMPRODUCT Fields Match a RANGE of Criteria

    Hi guys,

    I am trying to find out a formula that can combine the formulas in columns E and F (see attached photo)
    I have hundreds of finding value so that cannot use the separate formula.




    Thank you so much.
    Attached Images Attached Images
    Last edited by hhhle; 01-03-2021 at 09:17 PM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,647

    Re: MAX of SUMPRODUCT Fields Match a RANGE of Criteria

    Welcome to the forum.

    Doing so would cause a circular reference error, so will not be possible.

    Explain the purpose of this and someone may be able to suggest a workaround.

    Attach your workbook - instructions at the top of the page.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    12-29-2020
    Location
    Viet Nam
    MS-Off Ver
    365
    Posts
    13

    Re: MAX of SUMPRODUCT Fields Match a RANGE of Criteria

    Thank you very much for your advice.
    Please find the book for example as attached
    Attached Files Attached Files

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,647

    Re: MAX of SUMPRODUCT Fields Match a RANGE of Criteria

    You did not explain the purpose of this.

  5. #5
    Registered User
    Join Date
    12-29-2020
    Location
    Viet Nam
    MS-Off Ver
    365
    Posts
    13

    Re: MAX of SUMPRODUCT Fields Match a RANGE of Criteria

    Hi, this is the example workbook.
    I want to use one combine formula as I have so many finding values so that I cannot use the formula for each of them.
    Attached Files Attached Files

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,647

    Re: MAX of SUMPRODUCT Fields Match a RANGE of Criteria

    Yes, but why? What is the result that you want to see and where? You have not shown a mock-up of what you want.

  7. #7
    Registered User
    Join Date
    12-29-2020
    Location
    Viet Nam
    MS-Off Ver
    365
    Posts
    13

    Re: MAX of SUMPRODUCT Fields Match a RANGE of Criteria

    OK, I have 3 groups (A, B, C as column A in the workbook) and need to find out the max value in these groups.
    The value of each group is the result of SUMPRODUCT function based on columns B and C; and the condition as column D (same group name).

    ex: Group A value is 74*1 (or cell B4 * C4) + 51*1 (or cell B5 * C5) = 125 => cell E1 formula.
    Do the same with group B and C and we got value for each of them (cell E2, E3 formula)
    And finally, we use MAX to find out the largest value (Cell F1)=> this is my purpose.

    As you can see, I need to use 3 cells (for 3 groups) and 1 cell for the MAX.
    So I hope to find a way that I only need one formula that can find out the maximum value of 3 groups (as this example)
    [actually, I have so many groups so that find out this way make me save many cells and load]
    Last edited by hhhle; 12-30-2020 at 05:28 AM.

  8. #8
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,583

    Re: MAX of SUMPRODUCT Fields Match a RANGE of Criteria

    ARRAY formula in G2

    =MAX(MMULT(TRANSPOSE(1*(ROW($B$1:$B$9)>0)),(($B$1:$B$9)*($C$1:$C$9))*(1*($D$1:$D$9=TRANSPOSE($A$1:$A$3)))))

    To enter ARRAY formula
    Copy and paste the formula in cell
    Press F2
    Press Ctrl+Shift+Enter together
    Excel covers the formula with {}.
    Attached Files Attached Files
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  9. #9
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,210

    Re: MAX of SUMPRODUCT Fields Match a RANGE of Criteria

    Perhaps
    =MAX(SUMPRODUCT(--ISNUMBER(MATCH($D$1:$D$9,A1,0)),$B$1:$B$9,$C$1:$C$9),SUMPRODUCT(--ISNUMBER(MATCH($D$1:$D$9,A2,0)),$B$1:$B$9,$C$1:$C$9),SUMPRODUCT(--ISNUMBER(MATCH($D$1:$D$9,A3,0)),$B$1:$B$9,$C$1:$C$9))

  10. #10
    Valued Forum Contributor
    Join Date
    11-28-2015
    Location
    indo
    MS-Off Ver
    2016 64 bitt
    Posts
    1,257
    Quote Originally Posted by kvsrinivasamurthy View Post
    ARRAY formula in G2

    =MAX(MMULT(TRANSPOSE(1*(ROW($B$1:$B$9)>0)),(($B$1:$B$9)*($C$1:$C$9))*(1*($D$1:$D$9=TRANSPOSE($A$1:$A$3)))))
    Great formula using mmult
    "ThankyouFor Attention * And Your Help!!"

  11. #11
    Registered User
    Join Date
    12-29-2020
    Location
    Viet Nam
    MS-Off Ver
    365
    Posts
    13

    Re: MAX of SUMPRODUCT Fields Match a RANGE of Criteria

    Thank you very much. It works great

  12. #12
    Registered User
    Join Date
    12-29-2020
    Location
    Viet Nam
    MS-Off Ver
    365
    Posts
    13

    Re: MAX of SUMPRODUCT Fields Match a RANGE of Criteria

    Thank you but I have hundreds of value so that I cannot do that.

  13. #13
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,583

    Re: MAX of SUMPRODUCT Fields Match a RANGE of Criteria

    Thank you but I have hundreds of value so that I cannot do that.
    To whom you are referring to.
    Last edited by AliGW; 12-31-2020 at 03:47 AM.

  14. #14
    Valued Forum Contributor
    Join Date
    11-28-2015
    Location
    indo
    MS-Off Ver
    2016 64 bitt
    Posts
    1,257
    Quote Originally Posted by hhhle View Post
    Thank you but I have hundreds of value so that I cannot do that.
    Mmult will be imposible if max from column
    D (unique column D) without helper in Column A

  15. #15
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,647

    Re: MAX of SUMPRODUCT Fields Match a RANGE of Criteria

    For what it's worth, I believe this is solved and the OP has said (I think) that the MMULT solution works, but that the solution offered in post #9, because of its multi-part nature, is impractical.

  16. #16
    Registered User
    Join Date
    12-29-2020
    Location
    Viet Nam
    MS-Off Ver
    365
    Posts
    13

    Re: MAX of SUMPRODUCT Fields Match a RANGE of Criteria

    Quote Originally Posted by kvsrinivasamurthy View Post
    To whom you are referring to.
    for the solution of davsth.

    Perhaps
    =MAX(SUMPRODUCT(--ISNUMBER(MATCH($D$1:$D$9,A1,0)),$B$1:$B$9,$C$1:$C$9),SUMPRODUCT(--ISNUMBER(MATCH($D$1:$D$9,A2,0)),$B$1:$B$9,$C$1:$C$9),SUMPRODUCT(--ISNUMBER(MATCH($D$1:$D$9,A3,0)),$B$1:$B$9,$C$1:$C$9))

  17. #17
    Registered User
    Join Date
    12-29-2020
    Location
    Viet Nam
    MS-Off Ver
    365
    Posts
    13

    Re: MAX of SUMPRODUCT Fields Match a RANGE of Criteria

    Quote Originally Posted by AliGW View Post
    For what it's worth, I believe this is solved and the OP has said (I think) that the MMULT solution works, but that the solution offered in post #9, because of its multi-part nature, is impractical.
    This topic solved. Thank you all for this kindly support.

  18. #18
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,583

    Re: MAX of SUMPRODUCT Fields Match a RANGE of Criteria

    REF: My previous Post #8.
    All are ARRAY formulas.
    I have simplified the formula further
    Please Login or Register  to view this content.
    To get the group
    Please Login or Register  to view this content.
    Attached Files Attached Files

  19. #19
    Registered User
    Join Date
    12-29-2020
    Location
    Viet Nam
    MS-Off Ver
    365
    Posts
    13

    Re: MAX of SUMPRODUCT Fields Match a RANGE of Criteria

    Quote Originally Posted by kvsrinivasamurthy View Post
    REF: My previous Post #8.
    All are ARRAY formulas.
    I have simplified the formula further
    Please Login or Register  to view this content.
    To get the group
    Please Login or Register  to view this content.
    Thak you so much

+ 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. Auto fill a number from a table once two fields match criteria. IF/AND formula
    By Rellek1996 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-17-2020, 08:30 PM
  2. Replies: 1
    Last Post: 08-28-2019, 02:16 PM
  3. [SOLVED] SUMPRODUCT if Fields Match a RANGE of Criteria
    By jtang128 in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 08-24-2016, 10:39 AM
  4. [SOLVED] Index Match or sumproduct with 3 criteria to match
    By golden2282 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-18-2016, 03:10 PM
  5. sumproduct IF two arrays match a range of criteria?
    By Paul Sword in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-10-2013, 10:06 AM
  6. Find records that match criteria of multiple fields
    By jvbeats in forum Access Tables & Databases
    Replies: 3
    Last Post: 03-12-2013, 05:40 PM
  7. Replies: 5
    Last Post: 04-20-2012, 08:54 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