+ Reply to Thread
Results 1 to 4 of 4

Need help with COUNTIFS function and displaying a dynamic date range.

  1. #1
    Registered User
    Join Date
    07-09-2019
    Location
    Orange County, CA
    MS-Off Ver
    Office 365 Business
    Posts
    2

    Need help with COUNTIFS function and displaying a dynamic date range.

    Please see attached Office 365 Business Excel spreadsheet for reference.

    On the first tab, Tracker, I have data validation in Cells B2:D500 with a dropdown list based on values in the Sales Activity Variables tab. I have also established a data tab, where I want to accomplish the following:
    • Display a total count (sum) of the number of times each sales activity variable was completed in the last five days relative to the current day
    • Sum/count of the total time spent on each sales activity variable over the past five days relative to the current date

    I've tried several variations of the COUNTIFS, SUMPRODUCT, etc. formulas with no luck. I have no idea how to accomplish this. Trying to get the date range to display properly ends in an error every time. Thanks for your help!
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,728

    Re: Need help with COUNTIFS function and displaying a dynamic date range.

    You can use this formula in B2 of the Data sheet:

    =COUNTIFS(Tracker!B:B,$A2,Tracker!A:A,"<="&TODAY(),Tracker!A:A,">="&TODAY()-5)+COUNTIFS(Tracker!C:C,$A2,Tracker!A:A,"<="&TODAY(),Tracker!A:A,">="&TODAY()-5)+COUNTIFS(Tracker!D:D,$A2,Tracker!A:A,"<="&TODAY(),Tracker!A:A,">="&TODAY()-5)

    and this one in cell C2:

    =SUMIFS(Tracker!E:E,Tracker!B:B,$A2,Tracker!A:A,"<="&TODAY(),Tracker!A:A,">="&TODAY()-5)+SUMIFS(Tracker!F:F,Tracker!C:C,$A2,Tracker!A:A,"<="&TODAY(),Tracker!A:A,">="&TODAY()-5)+SUMIFS(Tracker!G:G,Tracker!D:D,$A2,Tracker!A:A,"<="&TODAY(),Tracker!A:A,">="&TODAY()-5)

    Copy them down as required.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    07-09-2019
    Location
    Orange County, CA
    MS-Off Ver
    Office 365 Business
    Posts
    2

    Re: Need help with COUNTIFS function and displaying a dynamic date range.

    Amazing! Thank you so much!

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,728

    Re: Need help with COUNTIFS function and displaying a dynamic date range.

    Glad to help.

    If that takes care of your original question, please take a moment to select Thread Tools from the menu above and to the right of your first post in this thread, and mark the thread as SOLVED.

    Also, since you are relatively new to the forum, you might like to know that you can directly thank those who have helped you by clicking on the small "star" icon located in the lower left corner of a post that you have found to be helpful (not just in this thread - for any post that has helped you). This also adds to the reputation of the poster (the small green bars in the poster's profile).

    Pete

+ 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. Displaying output in dynamic range
    By bigjdawg43 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-13-2017, 09:16 AM
  2. [SOLVED] Named Dynamic Range and Countifs formula
    By AliJWood in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-11-2017, 06:15 AM
  3. Replies: 2
    Last Post: 05-28-2014, 06:52 AM
  4. [SOLVED] Dynamic date check inside Countifs
    By mtnbiker98 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-26-2013, 04:16 PM
  5. [SOLVED] Dynamic COUNTIFS() with INDEX() Function
    By NeoFlex in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-12-2013, 04:15 PM
  6. Dynamic Named Range, COUNTIFs & VLookups
    By pmd in forum Excel General
    Replies: 7
    Last Post: 05-31-2010, 08:57 AM
  7. Displaying dynamic range values??
    By rpp114 in forum Excel General
    Replies: 1
    Last Post: 05-04-2006, 05:30 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