Breaking Task into Hours per Month
I have a task that spans multiple months, how do I calculate the time worked in each month? For example, the task starts April 14 and ends May 8. How do I calculate the hours worked in April and May on the task?
Best Answer
-
Hi @MartinTB,
For the April tasks, you can use the formula below. The same logic can be applied for the May tasks as well.
April Month,
=IF(
AND(MONTH(Start@row) = 4, MONTH(End@row) > 4),
NETWORKDAYS(Start@row, DATE(YEAR(Start@row), 4, 30)) * 8,
IF(MONTH(Start@row) = 4,
NETWORKDAYS(Start@row, End@row) * 8,
0
)
)
May Month,
=IF(
AND(MONTH(End@row) = 5, MONTH(Start@row) < 5),NETWORKDAYS(DATE(YEAR(End@row), 5, 1), End@row) * 8,IF(MONTH(Start@row) = 5,NETWORKDAYS(Start@row, End@row) * 8,0)
)
Please check and let me know if you need anything!Joseph Aloysias| Solutions Lead
vSaaS Global
Book a Meeting
Phone: +91-8148459084
Answers
-
Hi @MartinTB,
For the April tasks, you can use the formula below. The same logic can be applied for the May tasks as well.
April Month,
=IF(
AND(MONTH(Start@row) = 4, MONTH(End@row) > 4),
NETWORKDAYS(Start@row, DATE(YEAR(Start@row), 4, 30)) * 8,
IF(MONTH(Start@row) = 4,
NETWORKDAYS(Start@row, End@row) * 8,
0
)
)
May Month,
=IF(
AND(MONTH(End@row) = 5, MONTH(Start@row) < 5),NETWORKDAYS(DATE(YEAR(End@row), 5, 1), End@row) * 8,IF(MONTH(Start@row) = 5,NETWORKDAYS(Start@row, End@row) * 8,0)
)
Please check and let me know if you need anything!Joseph Aloysias| Solutions Lead
vSaaS Global
Book a Meeting
Phone: +91-8148459084 -
I'll plug this in and see what happens, thanks!
-
This worked perfectly! Thank you
-
Thank you, Joseph, you answered my question but I realize now I didn't ask the CORRECT question! Can you write an equation that counts the hours in EACH month between two dates? See attached snippet that has a theoretical start date in January and an end date in December.
Help Article Resources
Categories
Check out the Formula Handbook template!