+ Reply to Thread
Results 1 to 4 of 4

Sumproduct & count if with multiple criteria

  1. #1
    Forum Contributor
    Join Date
    02-07-2016
    Location
    England
    MS-Off Ver
    2019
    Posts
    270

    Sumproduct & count if with multiple criteria

    Hi Excel forum,

    I tried putting together the following code to countif only the visable cells if the following criteria is in the cells "P" "EL1" "EL2" & "EL3"

    Please see code
    Please Login or Register  to view this content.
    But i get 0 unless P is in the column.

    Please see attached workbook with outlined result.

    Thanks

    Jamidd
    Attached Files Attached Files

  2. #2
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Sumproduct & count if with multiple criteria

    Here's one option:

    J33 =SUMPRODUCT(SUBTOTAL(3,OFFSET(J2:J30,ROW(J2:J30)-MIN(ROW(J2:J30)),,1)),(J2:J30="P")+(J2:J30="EL1")+(J2:J30="EL2")+(J2:J30="EL3"))

  3. #3
    Forum Contributor
    Join Date
    02-07-2016
    Location
    England
    MS-Off Ver
    2019
    Posts
    270

    Re: Sumproduct & count if with multiple criteria

    Quote Originally Posted by 63falcondude View Post
    Here's one option:

    J33 =SUMPRODUCT(SUBTOTAL(3,OFFSET(J2:J30,ROW(J2:J30)-MIN(ROW(J2:J30)),,1)),(J2:J30="P")+(J2:J30="EL1")+(J2:J30="EL2")+(J2:J30="EL3"))
    Thanks this seems to work!

    Im guessing i just add like so to add more criteria =SUMPRODUCT(SUBTOTAL(3,OFFSET(J2:J30,ROW(J2:J30)-MIN(ROW(J2:J30)),,1)),(J2:J30="P")+(J2:J30="EL1")+(J2:J30="EL2")+(J2:J30="EL3")+(J2:J30="L1)) ??

    I wonder if there would be a way to simple it down because i do have another table i would like to use this formula on but i have 13 possible grades for that table compared to the three in this table!

  4. #4
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Sumproduct & count if with multiple criteria

    Sure, try this one:

    J33 =SUMPRODUCT((SUBTOTAL(3,OFFSET(J2:J30,ROW(J2:J30)-MIN(ROW(J2:J30)),,1)))*(ISNUMBER(SEARCH({"P","EL1","EL2","EL3"},J2:J30))))

    Thanks for the rep!
    Last edited by 63falcondude; 04-06-2018 at 01:51 PM.

+ 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] SUMPRODUCT function count the Unique values based on Multiple criteria
    By savetrees in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-15-2018, 04:03 AM
  2. Replies: 6
    Last Post: 12-14-2016, 12:36 PM
  3. Replies: 4
    Last Post: 02-12-2016, 04:27 PM
  4. Replies: 16
    Last Post: 05-25-2015, 08:51 AM
  5. Count w/multiple criteria across multiple columns - SUMPRODUCT, MATCH?
    By MrHoohah in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-23-2015, 05:23 PM
  6. Replies: 1
    Last Post: 02-21-2014, 09:09 PM
  7. [SOLVED] Need to use either COUNTIFS or SUMPRODUCT to count rows based on multiple criteria
    By erabinov in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-15-2013, 03: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