time sheet overtime hours add up - excel

This is basically about overtime calculations, but I want it calculated separately. IF(A1>8,A1-8,0)
I want A1 when it reaches 8, to flow over to I1. Now I know this formula...
But additionally I would also like B1, C1, and D1 to do the same. So what I'm saying is that each of those cells when a value above 8 is input, I would like it to flow into I1 aswell. That's one part of it, also I would like any amount that is input to cells E1, F1, and G1 to flow into I1 . The final 3 cells are basically weekend work and considered by my company as overtime.
=SUMPRODUCT((A11:G11>H3:N3)*(A11:G11-H3:N3))
So this one works guys but, what I want to do is grab from two separate rows for the seven days of the week. Like this.....
=SUMPRODUCT((D11:G11,A13:C13>H3:N3)*(D11:G11,A13:C13-H3:N3))
But what I'm getting now is #VALUE! I'm not sure what I'm doing wrong.
I would like to know if this is possible and will greatly appreciate the help solving this problem.

So Seeming no one answered you guys decided to minus my rep, I stumbled on the answer myself. I worked this out by making a table with each day and the hours of single time in them.
For the purpose of this formula below I'll say K3 is Sunday and that D19 is also the hours worked on the Sunday. It tells the cell to compare the number input to D19 and if greater than, then minus what is in K3 and return the value in the cell I have input the formula. Because this is for overtime I wanted it to add up each day separately and give me a running total through the week. This Formula worked perfectly for me.
=SUM((D19>$K$3)(D19-$K$3),(O11>$L$3)(O11-$L$3),(P11>$M$3)(P11-$M$3),(Q11>$N$3)(Q11-$N$3),(K13>$H$3)(K13-$H$3),(L13>$I$3)(L13-$I$3),(M13>$J$3)*(M13-$J$3))
Feel free to copy and paste and change it to suit your needs.

Related

Get working day of the month with the lowest value

I have a excel spreadsheet with two columns. One with a date and another with the value.
I want to get the working day of the month with the lowest value.
I tried to use a pivot table for it and then group the date but I get a lot of errors.
You can find the spreadsheet here and the sheet name is Historical. The others are just attempts made by me.
Spreadsheet
Thanks
The formula entered in E2 below
is
=AGGREGATE(15,6,(POWER(10,LOG10(((YEAR(D2)=YEAR($A$2:$A$3254))*(MONTH(D2)=MONTH($A$2:$A$3254)))))*$B$2:$B$3254),1)
and the array formula entered in F2 below is
=INDEX($A$2:$A$3254,MATCH(YEAR(D2)&MONTH(D2)&E2,YEAR($A$2:$A$3254)&MONTH($A$2:$A$3254)&$B$2:$B$3254,0))
I suggest to make an triple nested if-construct that checks if the weekday of the date is a workday, or the date+ 1 or the day +2. Assuming the date is in cell A4
= if(instr(weekday(A4),”23456”)>0, A4,
if(instr(weekday(A4+1),”23456”)>0, A4 + 1,
if(instr(weekday(A4+2),”23456”)>0, A4 + 2,”cannot happen”)))
Explanation: one of 3 consecutive days is always a working day.
There may be typos since I edit that on iPad without Excel available to test.
Weekday returns 1 for Sunday and 7 for Saturday. So 2-6 are workdays.
However with that simple approach you will not detect public holidays on a working day if that is a problem.
Hope I understood you question correctly. One data example with solution would have explained it better.

Time/hour calculation in excel

I’m so rusty on excel and I’m trying to work out a formula for this problem:
Shifts greater than 5 hours duration must take a 1 hour unpaid break.
I’m using for G5 =IF(G4>5:00:00,”1:00:00”,”0:00:00”)
G4 =shift duration, cell is formatted as [h]:mm
Once I get this to work I then add G4 and G5 and to get the shift finish time.
It sounds so simple but it’s driving me crazy!!! Any help would be appreciated!
Excel stores time field internally as numbers, where 1 is a complete day (which is 24 hours).
If G4 has the value "06:30" (a time ), Then a formula in G5 like this:
=G4*24, will give you the numeric value 6.5.
You formula to check for more than 5 hours can be:
IF(G4*24>5,"01:00:00","00:00:00")
But this will return a text (i.e.:"01:00:00"). This can be solved by adding the function TIMEVALUE()
=TIMEVALUE(IF(G4*24>5,"01:00:00","00:00:00"))
EDIT:
Another way can be:
=IF(G4>TIME(5,0,0),"01:00:00","00:00:00")

Sum values based on date compared to current date

I am currently trying to create an if statement that sums values based on whether a date has passed.
Excel example image
M1 to M12 dictate the months of the year e.g. 01/01/2021 for M1 and 01/12/2021 for M12
Now I want to create or use a formula that sums the values in row 4 based on what month we are currently in --> If we are currently in M1, e.g. 15/01/2021, then it only needs to sum the value in A4. However, if we are, for example, in M3 (28/03/2021) then it needs to sum A4 + B4 + C4
I tried using the following formula but the problem is that when it finds a value larger than 01/01/2021 it doesn't take other months into consideration anymore
=IF(TODAY()>=A2;A4;IF(TODAY()>=B2;SUM(A4:B4);0))
I added the zero at the end of the function to close the formula but my idea was to prolong it up til 12 months. However, it only ever sums the first cell (A4) because conditions have already been met. How do I 'overwrite' the first condition if more months have passed?
Any help would be greatly appreciated; I excuse myself for asking potentially dumb questions but Excel isn't my strong point and I am trying to learn.
Kind regards,
VHes
Try:
=SUM(INDEX(4:4,SEQUENCE(MONTH(TODAY()))))
An alternative approach using SUMIF:
=SUMIF(A2:L2,"<"&EOMONTH(TODAY(),0),A4:L4)
If SEQUENCE is not supported by your version of excel, (based on comments it does), you could also try the following:
=SUM(A4:INDEX(A4:L4,MONTH(TODAY())))
The trick here is that INDEX actually supplies a cell address, and displays the contents of that cell when needed.

Count seperate EXCEL cells if value >0

Background:
This excel is to track the hours someone works and what days. It also needs to track the total days worked in a week.
Requirement:
The 'Total Days' column needs to count the Monday(M) to Sunday (S) columns if they are greater than 0
Previously I had a simple COUNTIF(H6:K6, ">0") or whatever it was, which worked well.
Now the user has added in extra columns for pay and charge rates each day, after the corresponding day, which has thrown the formula off, and the COUNTIF formula wont do the columns separately inside the same formula.
Snippet of excel layout
Also some clarification, In AZ1 for instance I would want it to count H1, K1, N1, etc up to Z1
If anyone could help me work out a formula, that would be great!
COUNTIFS uses AND logic, whereas, you need OR logic. Try something like:
=COUNTIF(A3,">0") + COUNTIF(B3,">0")+...
EDIT: Since that didn't work, this should do the trick:
=COUNTIF(H5,">0")+COUNTIF(K5,">0")+COUNTIF(N5,">0")+COUNTIF(Q5,">0")+COUNTIF(T5,">0")+COUNTIF(W5,">0")+COUNTIF(Z5,">0")
Try using the MOD function to determine the stagger of the columns. SUMPRODUCT and ISNUMBER can take care of the rest.
=SUMPRODUCT(NOT(MOD(COLUMN(H:Z)-8, 3))*ISNUMBER(H6:Z6))

My Excel sheet adds 5 cells and displays them in another cell. I want to see the running total instead of waiting for all 5 cells to be filled

I believe this should be a pretty simple solution but I really don't know how to go about it..
I have the following formula in cell C20 =SUM(I13:I17) This is my total wages for that week. Cells I13-I17 are for Monday - Friday and what I got paid that day.
I would like it to display a running total instead of waiting for all 5 cells to have a number in them. Currently it won't show anything in C20 unless all cells have something. I can't alter anything with the I13-I17 as they are filled by another formula.
I want to be able to see what I've currently earned that week instead of waiting until Friday when all 5 cells have then been filled.
I hope I've explained my self well enough on this. It seems like it would be a very simple thing but I can't figure it out.
Thanks for any help,
Kyle..
use this instead
=If(I13<>"",If(I14<>"",IF(I15<>"",IF(I16<>"",If(I17<>"",SUM(I13:I17),SUM(I13:I16)),SUM(I13:I15)),SUM(I13:I14)),I13),"0")

Resources