+ Reply to Thread
Results 1 to 8 of 8

Combining Indirect with Countifs

  1. #1
    Registered User
    Join Date
    06-07-2013
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    34

    Combining Indirect with Countifs

    Morning all,

    I have a successful Countifs function that accumulates data from an individual sheet;

    =COUNTIFS('Week 3.2015'!$A$2:$A$298,$F$2,'Week 3.2015'!$E$2:$E$298,$A21,'Week 3.2015'!$G$2:$G$298,$C21,'Week 3.2015'!$H$2:$H$298,$B21,'Week 3.2015'!$L$2:$L$298,F$3)

    I have various sheets for different weeks that I combine on 1 Control sheet that gives a breakdown of the data. At present I copy and paste the function and then manually amend the information for the relevant sheet.

    Is there a way of referencing a sheet name in a cell so that it automatically searches for the data required. i.e the same function as above but automatically changes 'Week 3.2015' to 'Week 4.2015'? Having had a look around I think Indirect may work but where do I add it to the above function? Or happy to use another but would like to keep the Countifs the same.

    Thanks in advance,

    Phil

  2. #2
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Combining Indirect with Countifs

    Try

    =COUNTIFS(INDIRECT("'"&A5&"'!$A$2:$A$298"),$F$1,
    INDIRECT("'"&A5&"'!$E$2:$E$298"),$A21,
    INDIRECT("'"&A5&"'!$G$2:$G$298"),$C21,
    INDIRECT("'"&A5&"'!$H$2:$H$298"),$B21,
    INDIRECT("'"&A5&"'!$L$2:$L$298"),F$3)

  3. #3
    Registered User
    Join Date
    06-07-2013
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    34

    Re: Combining Indirect with Countifs

    Thanks Bob, with A5 being the sheet name I presume?

  4. #4
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Combining Indirect with Countifs

    Yeah, that is right. What's the weather like where you are?

  5. #5
    Registered User
    Join Date
    06-07-2013
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    34

    Re: Combining Indirect with Countifs

    Doesn't like it at the moment but I shall have a tinker and see what I can come up with.

    Weather 8oC bright and dry

  6. #6
    Registered User
    Join Date
    06-07-2013
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    34

    Re: Combining Indirect with Countifs

    Hi Bob,

    Still struggling slightly.

    On a seperate area of the spreadsheet, I have the following with fewer variables;

    Original
    =COUNTIFS('Week 5.2015'!$E$2:$E$349,$A4,'Week 5.2015'!$G$2:$G$349,$B4)
    Including Indirect
    =COUNTIFS(INDIRECT("'&AD1&"'!$E$2:$E$349"),$A4,INDIRECT("'&AD1&"'!$G$2:$G$349"),$B4)
    Where AD1 reads Week 5.2015

    Still coming up with an error... help please!

  7. #7
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Combining Indirect with Countifs

    You dropped a quotes

    =COUNTIFS(INDIRECT("'"&AD1&"'!$E$2:$E$349"),$A4,INDIRECT("'"&AD1&"'!$G$2:$G$349"),$B4)

  8. #8
    Registered User
    Join Date
    06-07-2013
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    34

    Re: Combining Indirect with Countifs

    Yes I did!!! You're a star and I'm really grateful, thank you.

+ 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] Indirect with countifs
    By cralph78 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 10-27-2014, 01:24 PM
  2. [SOLVED] Using indirect with countifs
    By macnabong in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-24-2014, 10:50 AM
  3. COUNTIFS with INDIRECT Formula Problem
    By GregM56 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-20-2014, 10:00 AM
  4. COUNTIFS and INDIRECT Function
    By Jeff9 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-25-2014, 03:22 PM
  5. [SOLVED] Combining two COUNTIFS
    By fletch8701 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-19-2012, 11:07 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