+ Reply to Thread
Results 1 to 8 of 8

Count active cases between two dates

  1. #1
    Registered User
    Join Date
    12-27-2021
    Location
    Frankfurt, Germany
    MS-Off Ver
    Microsoft 365
    Posts
    3

    Count active cases between two dates

    Hi Excel Forum Members,

    I'm searching for an elegant and effective solution for the following challenge:

    My data set contains information when a case was reported (Date reported) and also when a case was closed (Date closed). If the case is not closed yet, the cell "Date closed" remains empty. Each case is assigned to a handler (Person 1 - 5).

    I know how to insert a quick Pivot Table to analyze the current status of how many open cases does each loss handler have today.

    What I'm trying to achieve is a bar chart to show the development of open files at defined dates. In my file, I have set monthly dates and counted the amount of open files at that day manually... I'm trying to find a way to analyze:

    On each defined date, please count the number of files per case handler that were opened before the defined date and not yet closed on that date. With that analysis, I want to visualize the workload per case handler over time.

    I hope I described my goal well enough, in case of any questions please let me know.

    Looking foreward to your comments and thanks for your support,

    VB_75
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    06-05-2017
    Location
    Brazil
    MS-Off Ver
    Microsoft 365 Version 2404
    Posts
    1,259

    Re: Count active cases between two dates

    Welcome to the forum.
    Not sure I get it right.
    I made a list of unique handlers in column Q so as to use it in a data validation in H1.
    Then I use this formula in H4, copied across:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Good luck!
    Attached Files Attached Files

  3. #3
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    2,827

    Re: Count active cases between two dates

    Cell H3 try:
    =SUMPRODUCT((Tabelle1[Date reported]<=H$2)*((Tabelle1[Date closed]>H$2)+(Tabelle1[Date closed]="")))

    You state, "please count the number of files per case handler that were opened before the defined date", however, I'm guessing you mean, "were opened before OR ON the defined date. If you want it truly BEFORE the defined date, remove the "equal" sign before the first "H$2".

    Also, for June 1, 2021, you show 10. I'm showing 8 because your data shows that there were only 8 open on June 1.

  4. #4
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,585

    Re: Count active cases between two dates

    In P3 copied down

    Please Login or Register  to view this content.
    In Q3 then copied to full range

    Please Login or Register  to view this content.
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  5. #5
    Registered User
    Join Date
    12-27-2021
    Location
    Frankfurt, Germany
    MS-Off Ver
    Microsoft 365
    Posts
    3

    Re: Count active cases between two dates

    Thank you all for your prompt feedback, this is amazing!

    I will have a look and hope it is ok if I have any follow-up questions.

    Cheers

  6. #6
    Registered User
    Join Date
    12-27-2021
    Location
    Frankfurt, Germany
    MS-Off Ver
    Microsoft 365
    Posts
    3

    Re: Count active cases between two dates

    Hi Estevaoba,

    Love the approach how you broke it down to the assigned handlers!

    There are some issues with the results, and I believe it is because the formula ties it to the Status as open. For example, the first line (ID 805643) shows status "closed" which is the file's status today; however, it was open from 1-Jan until 27-Mar and assigned to "Person 1", so it should count as 1 for Person 1 for the Jan, Feb and Mar count. Since it was then closed on 27-Mar, this file would count as 0 from the Apr analysis onwards.

    Many thanks!

  7. #7
    Forum Expert
    Join Date
    06-05-2017
    Location
    Brazil
    MS-Off Ver
    Microsoft 365 Version 2404
    Posts
    1,259

    Re: Count active cases between two dates

    You're welcome.
    OK, my bad. I think I got it now, by adding two COUNTIFFS:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Please give it a shot.

  8. #8
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,585

    Re: Count active cases between two dates

    Revised formula in S3, copied to full range
    Please Login or Register  to view this content.
    For P3 then copied down
    Please Login or Register  to view this content.

+ 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. Subtracting values based on dates from specific cases
    By Shellystar1 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 11-30-2018, 10:09 PM
  2. [SOLVED] Formula to count active employees at specific calendar dates
    By robinc1969 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-13-2017, 02:07 PM
  3. [SOLVED] Count the number of cases that match the criteria
    By billj in forum Excel General
    Replies: 9
    Last Post: 11-23-2016, 09:43 AM
  4. Replies: 24
    Last Post: 10-28-2016, 12:22 PM
  5. Formula to count the number of cases that are open in a month
    By eekbubble in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-08-2015, 10:09 AM
  6. Add cases opened and closed for each month and specifics about the cases.
    By ChrisLaRoc in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-04-2014, 08:19 PM
  7. [SOLVED] Count unique cases in a weekly bucket
    By melnemac32 in forum Excel General
    Replies: 2
    Last Post: 10-25-2012, 01:21 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