Calculate Target Date based on DDL option

SaraWitch

Active Member
Joined
Sep 29, 2015
Messages
378
Office Version
  1. 365
Platform
  1. Windows
Hi peeps,

I am tying myself up in knots trying to calculate a target date based on a DDL selection in another cell. I've included the formulas I've tried to show what a pickle I'm getting in!
¦ MrExcel Queries.xlsm
ABCDEFGHIJ
1Agreed Time FrameDate givenTarget complete date (working days minus bank holidays)Should beBH 2024/25
2A01/08/2024=IF(OR(A2="A",NETWORKDAYS($B2,5,BH2024_25),IF(A2="B",NETWORKDAYS($B2,10,BH2024_25),IF(A2="C",NETWORKDAYS($B2,10,BH2024_25),IF(A2="D",NETWORKDAYS($B2,100,BH2024_25,""))))))08/08/202401/04/2024
3B02/08/2024=IF(OR(A3="A",NETWORKDAYS($B3+5-BH2024_25),IF(A3="B", NETWORKDAYS($B3+10-BH2024_25), IF(A3="C",NETWORKDAYS($B3+15-BH2024_25), IF(A3="D",NETWORKDAYS($B3+100-BH2024_25),"")))))16/08/202406/05/2024
4C07/08/2024=IF(OR(A2="A",NETWORKDAYS($B2,5,BH2024_25),A2="B",NETWORKDAYS($B2,10,BH2024_25),A2="C",NETWORKDAYS($B2,10,BH2024_25),A2="D",NETWORKDAYS($B2,100,BH2024_25),""))28/08/202427/05/2024
5D13/08/202406/01/202526/08/2024
625/12/2024
7A=Date given + 5 working days (minus bank holidays)26/12/2024
8B=Date given + 10 working days (minus bank holidays)01/01/2025
9C=Date given + 15 working days (minus bank holidays)
10D=Date given + 100 working days (minus bank holidays)
Target Date Based On DDL
Cells with Data Validation
CellAllowCriteria
A2:A5ListA,B,C,D

Any help would be greatly appreciated... :)
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
I've been considering alternative ways and a VLOOKUP works - I just need to minus the bank holidays:
¦ MrExcel Queries.xlsm
ABCDEFGHIJKLM
1Agreed Time FrameDate givenTarget complete date (working days minus bank holidays)Should beBH 2024/25Agreed Time Frame
2A01/08/202408/08/202408/08/202401/04/2024A5
3B02/08/202416/08/202416/08/202406/05/2024B10
4C07/08/202428/08/202429/08/202427/05/2024C15
5D13/08/202431/12/202406/01/202526/08/2024D100
625/12/2024
7A=Date given + 5 working days (minus bank holidays)26/12/2024
8B=Date given + 10 working days (minus bank holidays)01/01/2025
9C=Date given + 15 working days (minus bank holidays)
10D=Date given + 100 working days (minus bank holidays)
Target Date Based On DDL (2)
Cell Formulas
RangeFormula
C2:C5C2=IF(A2="","",WORKDAY(B2,VLOOKUP(A2,ATF,2,0)))
Named Ranges
NameRefers ToCells
'Target Date Based On DDL (2)'!ATF='Target Date Based On DDL (2)'!$L$2:$M$5C2:C5
Cells with Data Validation
CellAllowCriteria
A2:A5ListA,B,C,D

I'm sure it's really simple, but any help would be welcomed 😊
 
Upvote 0
I put your Agreed Time Frames into a table in A12:B15 and calculated the Target Date with an index,match in C2:C5. Is this what you're looking for?

Book1
ABCDEJ
1Agreed Time FrameDate givenTarget complete date (working days minus bank holidays)Should beBH 2024/25
2A1-Aug-248-Aug-248-Aug-241-Apr-24
3B2-Aug-2416-Aug-2416-Aug-246-May-24
4C7-Aug-2429-Aug-2428-Aug-2427-May-24
5D13-Aug-246-Jan-256-Jan-2526-Aug-24
625-Dec-24
7A=Date given + 5 working days (minus bank holidays)26-Dec-24
8B=Date given + 10 working days (minus bank holidays)1-Jan-25
9C=Date given + 15 working days (minus bank holidays)
10D=Date given + 100 working days (minus bank holidays)
11
12A5
13B10
14C15
15D100
Sheet1
Cell Formulas
RangeFormula
C2:C5C2=WORKDAY(B2,INDEX($A$12:$B$15,MATCH(A2,$A$12:$A$15,0),2),BH2024_25)
 
Upvote 1
Your VLOOKUP will work also, you just need to add your holiday table into the workday formula:
Excel Formula:
=IF(A2="","",WORKDAY(B2,VLOOKUP(A2,ATF,2,0),BH2024_25))
 
Upvote 0
Solution

Forum statistics

Threads
1,224,809
Messages
6,181,076
Members
453,020
Latest member
mattg2448

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