+ Reply to Thread
Results 1 to 2 of 2

Referencing multiple worksheets with COUNTIFS

  1. #1
    Registered User
    Join Date
    08-16-2021
    Location
    Bristol
    MS-Off Ver
    Office365
    Posts
    26

    Referencing multiple worksheets with COUNTIFS

    Good morning!

    I am trying to find a total for the number of referrals made each month to different members of our team using this formula:


    =COUNTIFS(All!B3:B992,">="&"01/02/2021", All!B3:B992,"<"&"01/03/2021", All!G3:G992, "Chris")

    At the moment, this gives an output of 2, as there are 2 cases on the All worksheet allocated to Chris.

    I simply adjust this to show how many referrals each calendar month are made to 'Chris', by taking the data from an existing worksheet named 'All'.

    I also want this total output from the COUNTIFS function to include the same date range and staff name from 2 other worksheets named ForClosure and CasesClosed respectively.

    I tried this:

    =COUNTIFS(All!B3:B992,">="&"01/02/2021", All!B3:B992,"<"&"01/03/2021", All!G3:G992, "Chris", ForClosure!B2:B992,">="&"01/02/2021", ForClosure!B2:B992,"<"&"01/03/2021", ForClosure!B2:B992, "Chris")

    ....but it gave an output of 0.

    How do I change the syntax to include both worksheets, and ultimately up to 3 more?

  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,428

    Re: Referencing multiple worksheets with COUNTIFS

    Try

    Create named range "Sheets" with the sheet names [All, ForClosure, CasesClosed]

    then use ..


    =SUMPRODUCT(COUNTIFS(INDIRECT("'" &Sheets &"'!B3:B992"),">="&"01/02/2021", INDIRECT("'" & Sheets & "'!B3:B992"),"<"&"01/03/2021", INDIRECT("'" & Sheets&"'!G3:G992"), "Chris"))

    I suggest you change the hard-coded dates to cell references e.g A1 , A2 containing your dates: similar for "name" (A3)

    =SUMPRODUCT(COUNTIFS(INDIRECT("'" &Sheets &"'!B3:B992"),">="&A1, INDIRECT("'" & Sheets & "'!B3:B992"),"<"&A2, INDIRECT("'" & Sheets&"'!G3:G992"), A3))
    Attached Files Attached Files
    Last edited by JohnTopley; 11-04-2021 at 09:12 AM.
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

+ 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] converting a countifs referencing part of the formula to a indirect countifs
    By DEEARO in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-30-2021, 03:17 PM
  2. multiple countifs with sheet referencing
    By benjii19 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-14-2015, 12:07 PM
  3. [SOLVED] COUNTIFS formula for multiple criteria referencing a formatted table
    By jholiday78 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-31-2015, 05:15 PM
  4. [SOLVED] Need an array formula, referencing unopened worksheets, that acts like COUNTIFS
    By jobdillon in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-19-2014, 11:16 AM
  5. Countifs over multiple worksheets issue
    By luciedefreitas in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-28-2014, 09:10 AM
  6. [SOLVED] COUNTIFS Across multiple worksheets
    By PalaceOzzy in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-24-2014, 01:28 PM
  7. COUNTIFS - Referencing a Table with Multiple Criteria/Conditions
    By MediaTrap in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-06-2013, 03:58 AM

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