This is going to be one of my longer posts. This came from one of my Judge Judy jobs (“Real cases, real people”). Essentially a course participant had to track the number of closed cases by category. She needed to factor in dates.
When I was doing this, I knew that I could have done it with a table (and I have included a Table version here) but I also considered that perhaps tables can be tricky so I chose to do it with all the rows. This means as more data is added the formula will update automatically, keeping the maintenance for the user to a minimum.
You can download the completed file here
You can download the start file here.
Step One – generated a dataset of 500 records using ChatGPT.
I went to ChatGPT and gave it the following prompt:
Please create a mock data set with about 500 lines with the following structure: Name, Classification, Task ,Start Date ,End Date. Please ensure some of the End Dates are blank and that the dates are in the format dd/mm/yyyy. For a fun twist, I asked it to give me the names with a Lord of the Rings flavour
Step Two – Assign a status to each entry.
The status was either Open or Closed. If there was a date in the End Date column, it was deemed Closed. If the End Date cell was blank or had a text entry, the case was deemed Open. I used an If function for that one.
Step Three – Prepare the list of Classifications
For this one, I used the Unique() function to generate a list of the Classifications. I wanted the list to be sorted alphabetically automatically so I used the Sort() function with it as well. Note that there is a 0 in the entries because I used the entire spreadsheet. If further classifications are added – this list will update automatically.
Step Four – Create the summary of Open Cases.
For this I used the Countifs function which basically counted the number of Open entries on or after the Start Dates for each classification
Step Five – Create the summary of Closed Cases.
Again, I used the Countifs() function but I factored in the Closed dates to it.
Step Six – Create a chart to show this.
Highlight my data and choose Bar Chart from Recommended charts.