Calculate future dates

jgalas

Board Regular
Joined
Jul 4, 2011
Messages
99
Office Version
  1. 2013
Platform
  1. Windows
Hi! I have a task that takes 50 hours. it can start on any business day and runs 2 hours on Tuesdays and 2 hours on Wednesdays. I want to know the end date of the task.
Ex: if the start date is 03/22/2023, the end date will be 06/20/2023 excluding a holiday on Tuesday (holidays and vacation days can be in a column)
can someone give me a tip please
 
You will struggle to get it accurate as it will depend on whether the start is a Tue, Wed or Fri & what holidays you have.
Ok.
If have a column with dates for Mondays, another for Tuesdays, another for Wednesdays, others for Thursdays,... starting at 22/03/2023 and count Tuesday 2 hours, Thursday 1 hour and Friday 1 hour until make 50 hours and return the last date (holiday - 25/4/2023 in D2:D7) - end date 20/6/2023
 
Upvote 0
@jgalas , i'm not sure how that will work. With WORKDAY.INTL I'm sure there is some way, with alot of crazy calcs and conditions.
there are probably some fancy array formulas that could do it as well, but those would take a long time to build, if even possible.

You have a tool with WORKDAY.INTL. I would be more than happy to see your solution when you have it.
 
Upvote 0

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
If you have 365 then try
Excel Formula:
=LET(d,WORKDAY.INTL(A2-1,SEQUENCE(100),"1001011",D2:D7),XLOOKUP(50,SCAN(0,WEEKDAY(d,2),LAMBDA(a,b,IF(b=2,a+2,a+1))),d,,1))
 
Upvote 0
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
I already updated my account data.
I use office 2013
Function "LET" and "LAMBDA", don't exist in my version.
Thanks for the time spent with me.
 
Upvote 0
Ok, how about
Excel Formula:
=INDEX(WORKDAY.INTL(A2-1,ROW(A1:A100),"1001011",D2:D7),AGGREGATE(15,6,ROW(A1:A100)/(MMULT(--(ROW(A1:A100)>=TRANSPOSE(ROW(A1:A100))),IF(WEEKDAY(WORKDAY.INTL(A2-1,ROW(A1:A100),"1001011",D2:D7),2)=2,2,1))>=50),1))
This may need to be confirmed with Ctrl Shift Enter, rather than just Enter.
 
Upvote 0
Ok, how about
Excel Formula:
=INDEX(WORKDAY.INTL(A2-1,ROW(A1:A100),"1001011",D2:D7),AGGREGATE(15,6,ROW(A1:A100)/(MMULT(--(ROW(A1:A100)>=TRANSPOSE(ROW(A1:A100))),IF(WEEKDAY(WORKDAY.INTL(A2-1,ROW(A1:A100),"1001011",D2:D7),2)=2,2,1))>=50),1))
This may need to be confirmed with Ctrl Shift Enter, rather than just Enter.
Don't work
I change it to:
=ÍNDICE(DIATRABALHO.INTL($L$7-1;LIN(A5:A104);"0101011";Data!$A$9:$A$100);AGREGAR(15;6;LIN(A5:A104)/(MATRIZ.MULT(--(LIN(A5:A104)>=TRANSPOR(LIN(A5:A104)));SE(DIATRABALHO(DIATRABALHO.INTL($L$7-1;LIN(A5:A104);"0101011";Data!$A$9:$A$100);2)=2;2;1))>=D14);1))

+ Ctrl Shift Enter

It give me 02/nov/2023 instead of 03/jul/2023
 
Upvote 0
This part LIN(A5:A104) needs to be LIN(A1:A100)
 
Upvote 0

Forum statistics

Threads
1,216,028
Messages
6,128,395
Members
449,446
Latest member
CodeCybear

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top