+ Reply to Thread
Results 1 to 7 of 7

SUMPRODUCT Formula for Multiple Conditions/Colums

  1. #1
    Registered User
    Join Date
    02-16-2018
    Location
    Ripon, CA
    MS-Off Ver
    2016
    Posts
    4

    SUMPRODUCT Formula for Multiple Conditions/Colums

    Hello. I've searched all over and tried everything I've found to come up with a formula for the following:

    I have a master sheet with 200 or so User IDs, months of the year, and production data (the chart below is just a small sample). I want to be able to enter a User ID in cell B10 and a month in cell B11 and have the result in B12. There are some blank/empty cells throughout the sheet. I've tried so many different things that I've gotten totally confused. Any help would be greatly appreciated. Thanks.

    This is not working: SUMPRODUCT(--(A1:G7=B10),--(A1:G7=B11),--(A1:G7="Errors"),(A1:G7))


    Jan Jan Feb Feb Mar Mar
    User ID Lines Errors Lines Errors Lines Errors
    TJC0546 107 0 178 2 146 2
    DJA0047 416 1 324 6 361 3
    DLB0009 100 0 210 0
    TJC2168 250 1 200 0 239 0
    TJC9735 301 1 280 1 294 3


    User ID: TJC2168
    Month: Feb
    Lines: 200

  2. #2
    Forum Expert
    Join Date
    11-27-2007
    Location
    New Jersey, USA
    MS-Off Ver
    2013
    Posts
    1,669

    Re: SUMPRODUCT Formula for Multiple Conditions/Colums

    See attached example.
    Does that work for you.
    Simple Offset / Match formula will work if the data is setup correctly.
    You can adjust the ranges.

    Formula used in B13:
    HTML Code: 
    Attached Files Attached Files
    1. Click on the * Add Reputation if you think this helped you
    2. Mark your thread as SOLVED when question is resolved

    Modytrane

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: SUMPRODUCT Formula for Multiple Conditions/Colums

    Using the sample from mod...
    A
    B
    C
    D
    E
    F
    G
    1
    Jan Jan Feb Feb Mar Mar
    2
    Lines Errors Lines Errors Lines Errors
    3
    A
    1
    2
    3
    4
    5
    6
    4
    B
    6
    7
    8
    9
    10
    11
    5
    C
    12
    13
    14
    15
    16
    17
    6
    D
    18
    19
    20
    21
    22
    23
    7
    E
    24
    25
    26
    27
    28
    29
    8
    F
    30
    31
    32
    33
    34
    35
    9
    10
    11
    USER ID D
    12
    Month Jan
    13
    Lines
    18

    This is a more efficient way to do what you want...
    =INDEX($B$3:$G$8,MATCH(B11,$A$3:$A$8,0),MATCH(B12,$B$1:$G$1,0))
    This is pulling from Lines column, if you need to pull from Errors...
    =INDEX($B$3:$G$8,MATCH(B11,$A$3:$A$8,0),MATCH(B12,$B$1:$G$1,0)+1)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    02-16-2018
    Location
    Ripon, CA
    MS-Off Ver
    2016
    Posts
    4

    Re: SUMPRODUCT Formula for Multiple Conditions/Colums

    Quote Originally Posted by modytrane View Post
    See attached example.
    Does that work for you.
    Simple Offset / Match formula will work if the data is setup correctly.
    You can adjust the ranges.

    Formula used in B13:
    HTML Code: 
    Does the trick. Thanks modytrane!

  5. #5
    Registered User
    Join Date
    02-16-2018
    Location
    Ripon, CA
    MS-Off Ver
    2016
    Posts
    4

    Re: SUMPRODUCT Formula for Multiple Conditions/Colums

    Quote Originally Posted by FDibbins View Post
    Using the sample from mod...
    A
    B
    C
    D
    E
    F
    G
    1
    Jan Jan Feb Feb Mar Mar
    2
    Lines Errors Lines Errors Lines Errors
    3
    A
    1
    2
    3
    4
    5
    6
    4
    B
    6
    7
    8
    9
    10
    11
    5
    C
    12
    13
    14
    15
    16
    17
    6
    D
    18
    19
    20
    21
    22
    23
    7
    E
    24
    25
    26
    27
    28
    29
    8
    F
    30
    31
    32
    33
    34
    35
    9
    10
    11
    USER ID D
    12
    Month Jan
    13
    Lines
    18

    This is a more efficient way to do what you want...
    =INDEX($B$3:$G$8,MATCH(B11,$A$3:$A$8,0),MATCH(B12,$B$1:$G$1,0))
    This is pulling from Lines column, if you need to pull from Errors...
    =INDEX($B$3:$G$8,MATCH(B11,$A$3:$A$8,0),MATCH(B12,$B$1:$G$1,0)+1)
    Works as well. Thanks FDibbins!

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: SUMPRODUCT Formula for Multiple Conditions/Colums

    Happy to help and thanks for the rep
    (INDEX is far more efficient that OFFSET, btw)

  7. #7
    Forum Expert
    Join Date
    11-27-2007
    Location
    New Jersey, USA
    MS-Off Ver
    2013
    Posts
    1,669

    Re: SUMPRODUCT Formula for Multiple Conditions/Colums

    1. Click on the * Add Reputation if you think this helped you
    2. Mark your thread as SOLVED when question is resolved

+ 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] Help with sumproduct formula multiple conditions
    By bjanabi in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 08-06-2017, 10:11 AM
  2. [SOLVED] SUMIF or SUMPRODUCT multiple conditions formula
    By KK1234 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-08-2015, 07:01 AM
  3. [SOLVED] Sumproduct with multiple conditions
    By rowena229 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-07-2015, 05:02 PM
  4. Excel formula to sumproduct but with multiple conditions
    By Dani8826 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-07-2014, 04:25 AM
  5. [SOLVED] Sumproduct with multiple conditions help
    By Murphy15 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-31-2013, 03:28 PM
  6. Formula required for comparing multiple colums to multiple colums
    By Pringgles in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-30-2012, 07:23 AM
  7. Sumproduct - multiple conditions
    By rasonline in forum Excel General
    Replies: 10
    Last Post: 06-04-2009, 05:10 PM

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