+ Reply to Thread
Results 1 to 3 of 3

SUMPRODUCT with TWO Conditions

  1. #1
    Registered User
    Join Date
    05-24-2010
    Location
    Corning, NY
    MS-Off Ver
    Excel 2003
    Posts
    3

    SUMPRODUCT with TWO Conditions

    A Previous post has been very helpful for summing on an AutoFiltered List.

    I used this formula and it worked well:

    =SUMPRODUCT(--(H9:H27="METHANOL"),SUBTOTAL(9,OFFSET(J9:J27,ROW(J9:J27)-MIN(ROW(J9:J27)),0,1)))

    NOW:

    Is there a way to modify the formula so that I pick up two conditions to satisfy the SUBTOTAL on J9:J27?

    For instance, I want to do the same SUBTOTAL on J9:J27 if BOTH H9:H27="METHANOL" and if G9:G27="PLANT A".

    I've tried to moditfy the formula but have not had success.

    Any suggestions would be greatly appreciated.

    Thanks,

    Akarupert

  2. #2
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: Need to use SUMPRODUCT with TWO Conditions met

    Hi, I have just added the second condition (both condions must be met) to your formula.

    =SUMPRODUCT(--(H9:H27="METHANOL")*(G9:G27="PLANT A"),SUBTOTAL(9,OFFSET(J9:J27,ROW(J9:J27)-MIN(ROW(J9:J27)),0,1)))


    Hope it works.

    Regards

  3. #3
    Registered User
    Join Date
    05-24-2010
    Location
    Corning, NY
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Need to use SUMPRODUCT with TWO Conditions met

    Yes, this works!

    Thanks!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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