+ Reply to Thread
Results 1 to 4 of 4

Countif function referencing a dynamic cell

  1. #1
    Registered User
    Join Date
    07-03-2013
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    19

    Countif function referencing a dynamic cell

    Hi!

    Hoping to get some help on this. I've got a cell (Q4) that I want to count the number of datapoints within a certain date range (C4 & C5) in a certain worksheet (selected from a drop-down list in C6). The formula I have in Q4 at the moment is:

    =COUNTIFS('wind speed'!$A$4:$A$58875,">="&start_date,'wind speed'!$A$4:$A$58875,"<="&end_date)

    What I'm trying to do is to change the parts in bold in the formula above to represent the value in cell C6 (which is dynamic as its selected from a drop-down list).
    The range on the worksheet is the same for all worksheets.

    Any ideas??

    Thanks!

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Countif function referencing a dynamic cell

    Try...

    =COUNTIFS(INDIRECT("'"&C6&"'!$A$4:$A$58875"),">="&start_date,INDIRECT("'"&C6&"'!$A$4:$A$58875"),"<="&end_date)
    HTH
    Regards, Jeff

  3. #3
    Registered User
    Join Date
    07-03-2013
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Countif function referencing a dynamic cell

    Genious! I was looking at the INDIRECT function, but had no idea how to apply it!

    Thank you!!

  4. #4
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Countif function referencing a dynamic cell

    You're welcome…glad you have a workable solution and thanks for the feedback...

    Here's a resource that may help...Excel INDIRECT Function

    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] COUNTIF Function with Dynamic Range
    By rzrbkpk in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-02-2013, 04:07 AM
  2. VBA Dynamic Cell Referencing for Charts title
    By sanjeevpandey in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-08-2013, 11:14 AM
  3. Dynamic Cell referencing in range function for vba in excel
    By karunakaranindia in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-23-2010, 01:30 AM
  4. Excel 2007 : Dynamic cell referencing
    By ozfader in forum Excel General
    Replies: 3
    Last Post: 10-11-2010, 11:59 PM
  5. cell referencing from a dynamic location
    By djrivum in forum Excel General
    Replies: 0
    Last Post: 01-21-2005, 12:58 PM

Tags for this Thread

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