+ Reply to Thread
Results 1 to 8 of 8

Counting Two Sets of Criteria Between Multiple Spreadsheets

  1. #1
    Registered User
    Join Date
    02-22-2017
    Location
    Japan
    MS-Off Ver
    2010
    Posts
    4

    Question Counting Two Sets of Criteria Between Multiple Spreadsheets

    Hi,

    I have data in 15 different worksheets in one workbook. I am trying to count data when it matches two separate sets of criteria (status & grade). Status is in the H column in the individual spreadsheets and Grade is in the B column in the individual spreadsheets. I have created a calculations page where l listed the separate spreadsheet names (column A), grade options (COLUMN C), and status options (COLUMN B).

    I have entered the below formula but get the #REF error message. I cannot figure out what the issue is. Please help! Thank you in advance.

    =SUMPRODUCT(COUNTIFS(INDIRECT("'"&$A$4:$A$18&"'!"&"H3:H100"),$B$4,INDIRECT("'"&$A$4:$A$18&"'!"&"B3:B100"),C4))
    Last edited by anl06010; 02-22-2017 at 10:34 PM.

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: Counting Two Sets of Criteria Between Multiple Spreadsheets

    15 separate files, or 15 sheets in the one file?
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Registered User
    Join Date
    02-22-2017
    Location
    Japan
    MS-Off Ver
    2010
    Posts
    4

    Re: Counting Two Sets of Criteria Between Multiple Spreadsheets

    Hi Glenn, 15 separate sheets in one workbook. Thanks!

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: Counting Two Sets of Criteria Between Multiple Spreadsheets

    Try this:

    =SUMPRODUCT(COUNTIFS(INDIRECT("'"&$A$4:$A$18&"'!H3:H100"),$B$4,INDIRECT("'"&$A$4:$A$18&"'!B3:B100"),C4))

  5. #5
    Registered User
    Join Date
    02-22-2017
    Location
    Japan
    MS-Off Ver
    2010
    Posts
    4

    Re: Counting Two Sets of Criteria Between Multiple Spreadsheets

    Thank you Glenn. It still gives me the #REF error for some reason :|

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: Counting Two Sets of Criteria Between Multiple Spreadsheets

    The attached sheet shows it working. The ranges are not identical to yours; but you can adapt it....


    =SUMPRODUCT(COUNTIFS(INDIRECT("'"&$A$4:$A$13&"'!A1:A100"),$B$4,INDIRECT("'"&$A$4:$A$13&"'!B1:B100"),C4))
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    02-22-2017
    Location
    Japan
    MS-Off Ver
    2010
    Posts
    4

    Re: Counting Two Sets of Criteria Between Multiple Spreadsheets

    Thank you Glenn! I see that it works perfectly on the spreadsheet you attached, but I can't get it to work on mine. I will keep trying. Thanks for your help.

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: Counting Two Sets of Criteria Between Multiple Spreadsheets

    Can you post your real sheet? If not, PM me...


    Will you please attach a SMALL sample Excel workbook (10-20 rows of data is usually enough)? Please don't attach a picture of one (no-one will want to re-type all your stuff before starting).

    1. Make sure that your sample data are truly REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired solution is also shown (mock up the results manually).

    3. Make sure that all confidential information is removed first!!

    4. Try to avoid using merged cells. They cause lots of problems!

    Unfortunately the attachment icon doesn't work at the moment. So, to attach an Excel file you have to do the following: Just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

+ 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. COUNTIF with 2 different sets of multiple criteria?
    By itsmickeymickey in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-18-2014, 10:52 AM
  2. COUNTIF with 2 different sets of multiple criteria?
    By itsmickeymickey in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-18-2014, 10:13 AM
  3. Replies: 1
    Last Post: 02-21-2014, 09:09 PM
  4. [SOLVED] SUMPRODUCT, COUNTIF formulas not correctly counting based on two sets of criteria
    By justinbelkin in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-11-2013, 10:12 AM
  5. Replies: 3
    Last Post: 03-01-2012, 06:17 AM
  6. Counting data sets based on multiple criteria
    By hjb0802 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-29-2010, 10:47 AM
  7. Counting a column based on two sets of criteria
    By Cjax in forum Excel General
    Replies: 4
    Last Post: 07-23-2009, 02:40 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