Hi,
I need a formula help to calculate a sum of hours such as (Normal Hours, OT1 Hours, OT2 Hours, Sundays, and Holiday Hours) in column W6:Z10 based on data in column C:V.
Sample sheet with expected results are enclosed.
Thanks,
Hi,
I need a formula help to calculate a sum of hours such as (Normal Hours, OT1 Hours, OT2 Hours, Sundays, and Holiday Hours) in column W6:Z10 based on data in column C:V.
Sample sheet with expected results are enclosed.
Thanks,
Hi. Good Day.
Please find attached the excel. The values that's arrived out of the formula here is the logic you have asked for. Verify the data manually for first line item. ID 12312.
There are totally only 3 days where it's less than or equal to 10 hours. The total you summed up gives 50?
In the formula - i have shared here gives the values as per the needs you placed in post. Share the Sunday's date List. The same can be adopted.
Please note all the hourly cells are covered in the formula framed.
Let me know, if this is what you are looking for or what needs to be done.
Thank You.
Regards.
Perpectuals
Thanks for the reply,
The hours up to or less than 10 are considered normal working hours on all days except Sundays and holidays; if the hours exceed 10 in a normal day (example: 15 working hours in a normal day 10 are normal working hours, 4 are OT1 hours, 1 is OT2 hours)
OT1 hours are between 10 hours and 14 hours, in a normal working day (14-10=4 or 12-10=2 etc.)
In normal working days, OT2 hours are between 14 and 24 (16-14=2, 18-14=4 etc.)
The total hours of Sundays and holidays are considered as OT2 hours.
Thanks,
VBA ...Hoildays in named range "Holidays"Please Login or Register to view this content.
in W16
=get_hours($C$4:$V$4,$C6:$V6,Holidays,COLUMN(A$1))
drag across
If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.
A formula solution
In W6 dragged downand in Z6Formula:Please Login or Register to view this content.Formula:Please Login or Register to view this content.
Many thanks to all of you for your respective solutions.
As such, I am seeking a single cell formula to return results in four columns at once, or a normal formula to return results in each column separately.
I would appreciate it if someone could look into my request.
What is wrong with the two formulae I suggested?
Not sure I understand why, but for Wfor XFormula:Please Login or Register to view this content.and for YFormula:Please Login or Register to view this content.Formula:Please Login or Register to view this content.
Last edited by HansDouwe; 08-07-2022 at 10:19 AM.
Here is a solution with only easy understanding formulas.
I've left the structure of your sheet intact, but I've only added auxiliary help rows.
Is this solution going in the right direction for you?
Do you have questions about the formulas?
Please feedback.
Last edited by HansDouwe; 08-07-2022 at 12:58 PM.
Thank you for addressing this formula solution in the simplest way, and all these formulas work well with shorter data, but with larger data, it would be difficult to separate work days and holidays, Sundays that in thousands of rows.
Thx for the feedback and the rep.
My solution is also suitable for many rows. See attachment.
You just need to copy the rows.
If you want I can throw out the auxiliary help rows again, but instead more complicated formulas arise.
It is what your wish is for.
Last edited by HansDouwe; 08-07-2022 at 02:29 PM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks