Open Office - How to get two different NOW() values to create a start/stop hours worked table - openoffice.org

Column 1 is START, and column 2 is STOP. I want to start work using =NOW() in column 1 and =NOW() in column 2 when finished, but it updates the first column when I do the latter. How can I get something like this in Open Office so I can calculate a time difference for column 3, total hours/minutes/seconds worked.

In LibreOffice there is a shortcut to get a fixed time value -- Ctrl+Shift+:.
To find the difference, enter =B1-A1 in C1. Format C1 as HH:MM:SS.
The shortcut does not work in Apache OpenOffice 4.1.2. For alternatives, see https://forum.openoffice.org/en/forum/viewtopic.php?f=21&t=12575.

Related

Time difference With 0 Values

Im having a problem in google sheets. I want to sum 2 columns the time that a driver is driving without the stops. So im using this formula to do it:
G7 is 10:20 value and H6 is 10:00.
But I want to do it in all the lines, but when I use the same formula:
I get this value:
Any idea how can I ignore the zero values that are making my database giving me wrong values when in this example the result I want is 00:40. The time driving without the unloads?
use:
=TEXT(SUMPRODUCT(IF(G7:G20="";;G7:G20-H6:H19)); "[h]:mm")

Combining multiple data from ID

I have a question for my current Spreadsheet A.
Now I'm trying to make a new sheet for report generation where:
Report shows each ticket recorded on spreadsheet A.
Each ticket have 3 recorded process time. (Verification, Repair, QA)
The month for when the job ticket is first registered.
For illustration purpose, new sheet should look like this:
Ticket ID
Verification
Repair
QA
Month
T-001
X Hour
Y Hour
Z Hour
9
T-002
X Hour
Blank if no recorded time
Blank if no recorded time
9
...
...
...
...
...
Can Google Sheets do that? If can, how do I do it?
I have tried looking for some tutorial videos on Vlookup/Hlookup/Query/Search/Find, but I cant seem to get the results I needed.
EDITED: Changed question 3 from Name to Month
My solution is not the most elegant but it works:
https://docs.google.com/spreadsheets/d/1dEMYbI751pp55YF5M0V19U0QbytsabgwAO_97I1LXqw/copy
First get all ticket names using UNIQUE formula
=unique(C3:C)
When you got it, you have to find rows using 2 conditions:
Process & Ticket. In order to get it using VLOOKUP I make temporary array that contains Process and Ticket columns stitched together and duration column.
Then I use VLOOKUP using 2 stitched keys
=ifna(
arrayformula(
vlookup(G2&$F$3:$F,ArrayFormula({$B$3:$B&$C$3:$C,$D$3:$D}),2,false)))
Ifna prevents from error messages displayed when no value is found.
First arrayformula lets work this formula for an entire column.
Last task is to determine name of an employee. I use vlookup, but as name is futher left then Ticket, I have to make a temporary array {C3:C,A3:A} to search for name.
Warning: Vlookup is listing only first name found on the list.

How to count entries by date with google time stamp

I have a large amount of data from multiple google form submitters with a google timestamp, column A. I am using
=ARRAYFORMULA(COUNTIFS('Angela-5'!$AQ$2:$AQ,"Missed appointment",INT('Angela-5'!$A$2:$A),TODAY()))
to count entries for today, which works. However, when I try to count entries for the last week,
=ARRAYFORMULA(COUNTIFS('Angela-5'!$AQ$2:$AQ,"Missed appointment",INT('Angela-5'!$A$2:$A),TODAY()-7))
it does not work.
How can I make this work?
Try
=ARRAYFORMULA(COUNTIFS('Angela-5'!$AQ$2:$AQ,"Missed appointment",INT('Angela-5'!$A$2:$A),(+TODAY()-7)))
TODAY()-7 is not being recognised as a formula by the criterion#2; changing it to (+TODAY()-7) forces the formula value (a week ago) to be expressed and it is recognised by the criterion#2.

How to use "if contains"?

I'm trying to make a scheduler for work and I have a dropdown list of the hours that the employees work in one column and I want it to display how many hours it is next to that. I.e.:
Column B (Selected from a drop down menu) Column C
6:00 - 14:30 to display 8 as it is an 8 hour shift
10:00 - 15:00 to display 5 as it is an 5 hour shift
Is there a way to do this?
So for the sake of clarity, I am going to develop this step by step, in several columns. These could be combined into one impenetrable formula, but that will not help you follow. You can do what I suggest here and then hide the columns with the calculation.
Suppose your time is in column A. You can do the following in the first row (mine assumes row 1, if you have headers, probably row 2) and then copy the formulas on down. In column B, I placed, =search("-",A1), which tells where the - sign is. In column C, I find the first time as a string with =left(A1,B1-2), which takes the first characters up to 2 before the dash. In column D I have =mid(A1,B1+2,5) which takes from 2 characters after the dash to the end (if it is only 4 characters long, it copies 4 not 5),and finally in column E we find the desired result, with =HOUR(timevalue(D1)-timevalue(C1)).
That does what you asked. If you wanted to add minutes you could use =MINUTE(timevalue(D1)-timevalue(C1)). Finally if a 22:00 - 6:00 graveyard shift existed, you would need to add logic for it.
You could also simplify the string calculation by in column B using the formula =split(A1,"-") and then putting =HOUR(timevalue(C1)-timevalue(B1))
And so if you really want a single formula, it could be =hour(INDEX((split(A1,"-")),2)-INDEX((split(A1,"-")),1)), which subtracts the first part from the second and converts to hours.
If in the course of time you want to handle the wrap around midnight, =iferror(hour(INDEX((split(A1,"-")),2)-INDEX((split(A1,"-")),1)),24-hour(INDEX((split(A1,"-")),1)-INDEX((split(A1,"-")),2))) should do the trick.
UPDATE: Sheets recognizes the times that resulted from the split as times. So if in B1 you place =split(A1,"-"), D1 can contain =C1-B1 if you are willing to keep the minutes. It even gives the right answer for 22:00 - 2:00.
Make a table with a column for the shifts (this could be the list used for the Validation, if you chose that method) and a column immediately to its right of the respective shift durations. I named that table Larry. Then in C2 (assuming your first dropdown is in B2):
=ArrayFormula(vlookup(B1:B,Larry,2,0))

Google Sheets VLOOKUP/IF

Plain english: Output 1 (yes) if the same ID# has more than one entry in the sheet within 5 minutes.
Example sheet, feel free to change anything: https://docs.google.com/spreadsheets/d/184jhnAmu63HSYl69prnAP7xo7j2PFvzjrWgDS4zj7dU
My thought is to get VLOOKUP to output something with an IF statement. But could also VLOOKUP in column E, IF calculation in column F?
VLOOKUP: input column D, output 1 in column e when input value is between 0 and 0.00347222221898846 (5 minutes reformatted). Output 0 if >0.00347222221898846.
Then I was trying to have an IF statement parse column A so that if the same value in A is present within the last 5 minutes. But I can't really figure out the IF statement.
Something like: time elapsed is less than 5 minutes (0.00347222221898846) AND that ID# was a previous entry (within the last 5 minutes). In some instances, another ID# will be the previous entry, but still within 5 minutes, so the IF can't just look up one row.
Well, I ended up just using IF/AND statements and a few extra calculation columns, see example sheet.
If anyone has any more efficient methods, let me know.

Resources