I have big trouble making my formula works and I am pretty sure that this is simple.So simple that I am litteraly struggling on it for weeks now.. So I give up :'(
Let me explain:I am using sheets to schedule when my shipment ETA. So I have these informations:
"CMD": which is when the customer made his command
"PM": which is just an opt-in to know if the command were made after noon
"SHIPMENT": which is just a choice of tranporters
"WORKDAYS": which is the number of workdays for each transporter. linked with "shipment"
"ETA": which is the Formula I want to make to have the accurate estimated time of arrival
(see image below where I show the correct results in ETA)
Things to know:
- workday delivery is each day except on sunday
- if "PM"=true, then you can add a day to delivery (see raw 2 and 3 on the example)
- if "CMD" is: friday+"PM"=true then the count starts on next monday (see raw 6 and 7 on the example)
- if "CMD" is: saturday or sunday then the count starts on next monday (see raw 8 and 9 on the example)
Things I've tried so far:
- a lot of formulas to say different things. I tried the barbarian way (with holidays and different workdays in sheet 'data v2'):
=if(isblank(B7);""; if(C7=true;ifs(G7="Mondial Relay";WORKDAY.INTL(B7;H7+1;'data v2'!$K$4;'data v2'!$M$3:$M$13);G7="Chrono 24h";workday.intl(B7;H7+1;'data v2'!$K$3;'data v2'!$M$3:$M$13);G7="Colissimo";workday.intl(B7;H7+1;'data v2'!$K$5;'data v2'!$M$3:$M$13));ifs(G7="Mondial Relay";WORKDAY.INTL(B7;H7;'data v2'!$K$4;'data v2'!$M$3:$M$13);G7="Chrono 24h";workday.intl(B7;H7;'data v2'!$K$3;'data v2'!$M$3:$M$13);G7="Colissimo";workday.intl(B7;H7;'data v2'!$K$5;'data v2'!$M$3:$M$13))))
And I tried the "I"m so smart" way (with just "CMD"+"workdays" and when friday+PM or saturday or sunday = next monday +"workdays"):
=if(isblank(B2);"";IFS(C2=true;WORKDAY.INTL(B2+1;H2;11);weekday(B2)=7;WORKDAY.INTL(B2+2;H2;11);weekday(B2)=1;WORKDAY.INTL(B2+1;H2;11);and(weekday(B2)>1;weekday(B2)<7);WORKDAY.INTL(B2;H2;11);and(C2=true;weekday=6);WORKDAY.INTL(B2+1;H2;1)))
And tried to find some way to turn theses days into next monday
=IF(WEEKDAY(B50;3)=0;B50;1)
=B51+MOD(9-B51;7)
=B2+MOD(9-WEEKDAY(B2);7)
And finally thought "hey, let's make it simple !" Guess what.. did not work
=WORKDAY.INTL(B49;H49;11)
Do someone has a solution before I start crying ?
Many thanks if you read this
