2 min readfrom Microsoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community

Counting hours only if they are before or after a certain time

Our take

Are you struggling to accurately track studio hours when sessions stretch past midnight? As a shared studio member, managing your allotted hours can be tricky, especially with categories like Do Not Disturb (DND) and late-night bookings. To maintain clear boundaries, you need a solution that differentiates between daytime and late-night hours seamlessly. By leveraging simple calculations, you can automatically separate session durations before and after midnight, ensuring DND hours remain intact.

I am part of a studio share with some friends, and we book through google calendar. We have an allotted amount of hours, and I'm making a spreadsheet that calculates how many hours we've used.

There are different types of hours; do not disturb, walk-in, visitors welcome, and late hours. Right now, my spreadsheet categorizes the hours based on the words in the title of the event (for instance, someone would name an event "jane, DND" and it would subtract a certain number of DND hours from jane).

However, late night hours are within a certain time frame. I'm thinking about the scenario where someones session begins during the day, and goes into the late night- I don't want late night time to eat into DND hours. I'm wondering if there is a way to calculate the duration before midnight, and the duration after midnight.

I'm able to input the start time and end time from google calendar, and calculate a total duration by subtracting start time from end time. But if I have a session from 8PM to 2AM, is there a way to calculate the time from 8PM to midnight, and then the time from midnight to 2AM?

https://preview.redd.it/igtycpq0flig1.png?width=948&format=png&auto=webp&s=20acafe1f7285146d7752230929bb90ea52eda6a

Each row is a different session

submitted by /u/raspberrypiesoup
[link] [comments]

Read on the original site

Open the publisher's page for the full experience

View original article

Related Articles

Tagged with