Formula Help with Counting Chaplain Visits Over Three Shifts Per Day

Brass Contributor

The Date and Time column E is the record of the Progress Note. My question is, ”What is the formula to calculate in Excel version 16.65 to get the number of Chaplain Visits occurrences Per Shift if shifts are defined as 1st Shift: 12:00 AM to 8:00 AM, 2nd Shift: 8:00 AM to 4:00 PM, and 3rd Shift: 4:00 PM to 12:00 AM.” I also want to represent that result in a pie chart. Please note that column F is the result in another spreadsheet from a report that I do not have the option to change or separate.


In other words, how many times did Chaplains file a Progress Note during the 1st Shift: between 12:00 AM to 8:00 AM, the 2nd Shift: between 8:00 AM to 4:00 PM, and the 3rd Shift: between 4:00 PM to 12:00 AM.?

2 Replies

@Richard_JamesI hope I have understood the question correctly. Please try the following formulas for Shift 1-3:





Here's my solution:



    filtered, FILTER(FileTime, Dates = v),
    freq, TOROW(FREQUENCY(filtered, v + BIN)),
    First2Shifts, TAKE(freq, , 2),
    Shift3, SUM(TAKE(freq, , -2)),
    VSTACK(a, HSTACK(v, First2Shifts, Shift3))

'Sheet level formula


A glimpse of some of the results: