+ Reply to Thread
Results 1 to 14 of 14

SUMIF or SUMPRODUCT formula to SUM totals based on multiple criteria

  1. #1
    Registered User
    Join Date
    05-19-2016
    Location
    Cambridge, Ontario
    MS-Off Ver
    2010
    Posts
    47

    SUMIF or SUMPRODUCT formula to SUM totals based on multiple criteria

    Hi all,

    Looking for help creating a formula that will count the appropriate numbers. I need it to sum all the 1's into the specific categories based on the following criteria.
    - Shop
    - Shift (A - for sample attached)
    - Position (Group Leader & Temporary group leader for sample attached)
    - Date

    First Sheet is the raw data I need to sort, second sheet is where the data needs to be sorted. Each data on the second sheet will have a number that corresponds to the sum for that specific date.


    The current formula i've been trying to use is:
    =SUMPRODUCT('GL TL Summer VC Report'!$B$2:$B$1635=$A3)*('GL TL Summer VC Report'!$G$1:$AU$1=B3)*('GL TL Summer VC Report'!$F$1:$F$1635='GL&TL VC Report'!$B$1)

    No luck though, any help is appreciated!
    Attached Files Attached Files

  2. #2
    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,192

    Re: SUMIF or SUMPRODUCT formula to SUM totals based on multiple criteria

    Duplicate post:

    =SUMPRODUCT(--(ISNUMBER('GL TL Summer VC Report'!$G$2:$AU$100))*('GL TL Summer VC Report'!$F$2:$F$100=$B$1)*('GL TL Summer VC Report'!$B$2:$B$100=$A4)*('GL TL Summer VC Report'!$G$1:$AU$1=B$2))

    Given in your previous post.

  3. #3
    Registered User
    Join Date
    05-19-2016
    Location
    Cambridge, Ontario
    MS-Off Ver
    2010
    Posts
    47

    Re: SUMIF or SUMPRODUCT formula to SUM totals based on multiple criteria

    Thank you John, incredibly helpful as always.

  4. #4
    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,192

    Re: SUMIF or SUMPRODUCT formula to SUM totals based on multiple criteria

    Typo (which I am sure you spotted!)

    In B3

    =SUMPRODUCT(--(ISNUMBER('GL TL Summer VC Report'!$G$2:$AU$100))*('GL TL Summer VC Report'!$F$2:$F$100=$B$1)*('GL TL Summer VC Report'!$B$2:$B$100=$A3)*('GL TL Summer VC Report'!$G$1:$AU$1=B$2))

  5. #5
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,908

    Re: SUMIF or SUMPRODUCT formula to SUM totals based on multiple criteria

    Or try this ...

    =SUMIFS(OFFSET('GL TL Summer VC Report'!$F$2:$F$100,,MATCH(B$2,'GL TL Summer VC Report'!$G$1:$AU$1,0)),
    'GL TL Summer VC Report'!$B$2:$B$100,'GL&TL VC Report'!$A3,'GL TL Summer VC Report'!$F$2:$F$100,$B$1)

  6. #6
    Registered User
    Join Date
    05-19-2016
    Location
    Cambridge, Ontario
    MS-Off Ver
    2010
    Posts
    47

    Re: SUMIF or SUMPRODUCT formula to SUM totals based on multiple criteria

    Hi guys,

    I have a similar request, I am trying to do the same thing into this first sheet (Total GL TL TM Data) so that i can get data from the second sheet (duplicate) so it will tell me the corresponding amount for:
    - Each position
    - Each shop
    - Shift
    and
    - Date

    I keep getting "1" which isn't right :/ i'm using this formula

    =SUMPRODUCT(--(ISNUMBER(Duplicate!$D$3:$AR$114))*(Duplicate!$A$3:$A$114=$A2)*(Duplicate!$C$3:$C$114='Total GL TL TM Data'!$C2)*(Duplicate!$B$3:$B$114=$B2)*(Duplicate!$D$2:$AR$2=F$1))

    I attached a sample. ps i haven't filled out the info for "TM" yet so that will be 0 still.

    Thanks in advance!
    Attached Files Attached Files

  7. #7
    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,192

    Re: SUMIF or SUMPRODUCT formula to SUM totals based on multiple criteria

    Check your fields .....

    =SUMPRODUCT(--(ISNUMBER(Duplicate!$D$3:$AR$114))*(Duplicate!$A$3:$A$114=$A2)*(Duplicate!$C$3:$C$114='Total GL TL TM Data'!$C2)*(Duplicate!$B$3:$B$114=$B2)*(Duplicate!$D$2:$AR$2=F$1))

    Checking Shift (text) vs Position (Numeric)

  8. #8
    Registered User
    Join Date
    05-19-2016
    Location
    Cambridge, Ontario
    MS-Off Ver
    2010
    Posts
    47

    Re: SUMIF or SUMPRODUCT formula to SUM totals based on multiple criteria

    Yeah sorry john I'm still not seeing the problem

  9. #9
    Registered User
    Join Date
    05-19-2016
    Location
    Cambridge, Ontario
    MS-Off Ver
    2010
    Posts
    47

    Re: SUMIF or SUMPRODUCT formula to SUM totals based on multiple criteria

    Sorry there's 2 "position" collumns

  10. #10
    Registered User
    Join Date
    05-19-2016
    Location
    Cambridge, Ontario
    MS-Off Ver
    2010
    Posts
    47

    Re: SUMIF or SUMPRODUCT formula to SUM totals based on multiple criteria

    Fixed what you had mentioned before but still having issues. The number it is presenting is incorrect. Any help is appreciated.

  11. #11
    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,192

    Re: SUMIF or SUMPRODUCT formula to SUM totals based on multiple criteria

    Re-post file with formulae showing expected results.

  12. #12
    Registered User
    Join Date
    05-19-2016
    Location
    Cambridge, Ontario
    MS-Off Ver
    2010
    Posts
    47

    Re: SUMIF or SUMPRODUCT formula to SUM totals based on multiple criteria

    okay, I attached another sample of some of the data im working with. The # in each date should be equivalent to the following:
    - Same shop
    - Same position (not position #)
    - Same shift
    and Same Date

    These numbers vary, anywhere from 0 to 60ish.

    i've tried to recreate the formula I was using yesterday but had no luck, the one I came up with is giving me #N/A so obviously I'm doing something wrong. Here it is below:

    =SUMPRODUCT(--(ISNUMBER(Duplicate!$D$3:$AP$170))*(Duplicate!$A$3:$A$170=$A2)*(Duplicate!$B$3:$B$170='Total GL TL TM Data'!$D2)*(Duplicate!$C$3:$C$170='Total GL TL TM Data'!$C2)*(Duplicate!$D$2:$AR$2='Total GL TL TM Data'!F$1))
    Attached Files Attached Files

  13. #13
    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,192

    Re: SUMIF or SUMPRODUCT formula to SUM totals based on multiple criteria

    Try

    =SUMPRODUCT((Duplicate!$D$3:$AR$170)*(Duplicate!$A$3:$A$170=$A4)*(Duplicate!$B$3:$B$170=$D4)*(Duplicate!$C$3:$C$170=$C4)*(Duplicate!$D$2:$AR$2=F$1))

    The data in "Duplicate" appears to be daily, but in the "Total ...." it is "weekly" intervals. Is some sort of summation required?

  14. #14
    Registered User
    Join Date
    05-19-2016
    Location
    Cambridge, Ontario
    MS-Off Ver
    2010
    Posts
    47

    Re: SUMIF or SUMPRODUCT formula to SUM totals based on multiple criteria

    Ended up just using an index match formula, thanks for the help

+ 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] Need insight adjusting SUMPRODUCT or SUMIF formula to capture multiple criteria
    By jnswbc in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-05-2016, 11:57 AM
  2. [SOLVED] Sumif or Sumproduct with multiple criteria
    By BPSJACK in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-30-2015, 06:25 AM
  3. [SOLVED] index match and sumproduct or sumif on multiple criteria
    By tabkaz in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 07-02-2014, 06:20 AM
  4. Sumif or sumproduct with multiple criteria
    By msoregon91 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-24-2013, 03:56 PM
  5. Replies: 2
    Last Post: 01-23-2013, 06:25 AM
  6. Sumproduct/sumif/indirect across multiple workbooks, worksheets, multiple criteria
    By robgardner15 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-08-2011, 02:35 AM
  7. SUMIF Multiple Criteria or SUMPRODUCT?
    By gdwright07 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-02-2008, 12:15 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