Conditional Formatting Time After Midnight in Google Sheets - google-sheets

I'm working on a Google Sheets timesheet. I want to conditionally format a cell if the user enters a Time Out past Midnight. In the example below, the user added an extra 15 minutes to his Time Out, which belongs on the row for the next day.
timesheet
I tried Conditionally Formatting a cell for any time greater than Midnight, which didn't work because ALL times are beyond Midnight. Also, I want to apply the conditional formatting to every cell in my Time Out columns. So I'm guessing the solution must involve the ARRAY function.
Any suggestions? Thanks in advance!

Assuming you mean that you need to highlight those timelines that start in one day and finish in the next one, you can think that the condition will be true if the hour of leaving is smaller than the hour of arriving (unless you can have more than 24 hours straight, in which case this wouldn't work).
Then you could set this condition:
=if(hour($C2)<hour($B2),true,false)

Related

Time format in Google sheets

I have a 2 columns. One with a planned time of departure and another with actual time of departure. Up until a few days ago, if there was a delay, the difference would read as a negative number. For example, if the planned time was 8:00AM and the actual time was 8:21AM, the 3rd column showed a delay as "-00:21:00"), but now the duration of the delay is displayed as 24:00:00 minus the number of minutes of the delay, as shown in this snippet:
Fortunately, any/all formulas still read and process the values, so this is really just a cosmetic issue for anyone who wants to glance at the raw data.
sounds like the formatting got reset. select your Delayed column and change the format to Duration

Pacing formula by hour rather than day

I have the below formula which calculates the current pacing of a campaign based on the number of clicks currently achieved vs the number of clicks it is meant to achieve. For example, if the campaign is supposed to achieve 100 clicks over 10 days, but then only gets 5 clicks in the first day, it'll be pacing at 50%.
It works well, however the pacing is only calculated by day, whereas I'd like to do it by hour. How can I achieve this? I tried dividing by 24 but that went horribly wrong!
Working (daily) formula below:
=SUM((S48/(Live!$B$1-G48 +1))*((H48-G48 +1)/K48))
S48 = number of clicks currently achieved
B1 = todays date (e.g. 21/07/2020)
G48 = start date of campaign used for pacing formula
H48 = end date of campaign used for pacing formula
K48 = total number of clicks the campaign needs to achieve
In the original formula, you don't need SUM(.
=(S48/(Live!$B$1-G48 +1))*((H48-G48 +1)/K48)
should work fine.
To make it work hourly, you'll need to make sure that B1 has the latest time and not just the latest date. You can automate that by using =now() instead of today().
The hourly formula is:
=(S48/((Live!$B$1-G48 +1)*24)*(((H48-G48 +1)*24)/K48))

Average of cell content based on day of month

I'm attempting to get an average number of calls/day based on yesterday's date.
My initial formula looks like this: =round(average(C24/3),2), where:
C24 = the total number of calls,
/3 = diving the contents of C24 by yesterday (assuming yesterday was the 3rd of the month),
,2 = rounding answer to 2 decimal places.
The formula itself works fine, but I have to go in daily to change the 'date' (/3, in my example).
Any suggestions as to how I can automate this formula so as to not have to go in to change the day of the month every day?
(for what it's worth, i tried using =round(average(C24/today()),2), but get a divide by zero error. Not sure what else to try. I also googled rolling averages/moving averages, but that didn't seem to help either.)
Use DAY and TODAY.
=DAY(TODAY()-1)
So
=ROUND(AVERAGE(C24/DAY(TODAY()-1)),2)

How can I get specific cells to increase by one hour each hour based off another cells start time

Here is a sample sheet of what I'm trying to accomplish
Basically, I am trying to get Column C to increase by one hour each hour based off of Column E start time. So if Mark starts at 6 when I check at noon it would show 6 hours for him etc.
https://docs.google.com/spreadsheets/d/16Mr3O0v_mCoEQhEBb1iPSayrE4yFlKevAdf-nXaZkKE/edit?usp=sharing
In your column C you can create a formula that references the current date time.
The formula I found in Google Docs is: HOUR(NOW()), which will pull the hour portion of the current datetime. The full formula would then be =HOUR(NOW())-E2 for the first cell in your worksheet.

GSheets: Calculating difference in times in a 24 hour business

I'm trying to calculate the difference between a start time and a persons first action and the same for the end time and their last action.
My problem is due to having a 24 hour business I can't seem to figure out a single formula to cope with shift times and actions being anywhere in the 24 hour time frame.
Example sheet
The start times are manually imputed as "06:00" format and the Actions are taken from a Left("12/09/2017 19:08:25"),8 format.
The data entry is bad. You need to enter start and end times with its date ( You could just format it as just time for presentation purposes). But dates have to entered in and should be there below the time. For example, One of the finish times is 00:00:00 , while the expected finish time is 23:00:00. We could assume that he worked one hour late and ended his shift by start of tomorrow. But spreadsheets cannot assume. It would think that he finished by today morning 00:00:00 instead of his actual finish time tomorrow morning 00:00:00. So he went off early by 23 hours. Once that's fixed, You could simply find the difference between the two times. But, You have to format that column as number>Duration instead of Time.
To sum up,
Add dates to start and end times
Format the resulting difference column as Number>Duration.

Resources