I'm creating a schedule that loops through a list of approver/preparer names. The goal is to have each individual evenly distributed throughout the list on different days which I have accomplished.
However, the last objective I have is to make it so if the preparer or approver on duty is on vacation that day it will automatically switch to the next available person within the list. Note the preparer can not be the same as the approver.
Is there a way to complete this with a function? I'm very close but cant figure out how to make it so it looks at the 3 different people that are out on vacation and grabs the next person who is available.
Here are the formulas I have so far which rotates the list as needed but does not take into account if the person is out of the office the Vacation validation section was my attempt at seeing whether that person was out of the office, however I believe all of this could be coupled into one function/vba solution?:
Preparer Column: =IF(H3<>"NO","HOLIDAY",IF(OR(WEEKDAY(A3)={1,7}),"WEEKEND",IF(MATCH(F3,B3:D3,0),OFFSET('Input Data (For Schedule Prep)'!$C$2,MOD((ROW(A2)-3),COUNTA('Input Data (For Schedule Prep)'!C:C)-3),0),IF(AND(WEEKDAY(A3)<>{3,5},(K3="Yes")),'Input Data (For Schedule Prep)'!$G$2,OFFSET('Input Data (For Schedule Prep)'!$C$2,MOD((ROW(A2)-1),COUNTA('Input Data (For Schedule Prep)'!C:C)-1),0)))))
Approver Column: =IF(H3<>"NO","HOLIDAY",IF(OR(WEEKDAY(A3)={1,7}),"WEEKEND",IF(G3=D3,OFFSET('Input Data (For Schedule Prep)'!$C$2,MOD((ROW(A1)+1),COUNTA('Input Data (For Schedule Prep)'!C:C)-1),0),OFFSET('Input Data (For Schedule Prep)'!$C$2,MOD((ROW(A1)-2),COUNTA('Input Data (For Schedule Prep)'!C:C)-1),0))))
However, the last objective I have is to make it so if the preparer or approver on duty is on vacation that day it will automatically switch to the next available person within the list. Note the preparer can not be the same as the approver.
Is there a way to complete this with a function? I'm very close but cant figure out how to make it so it looks at the 3 different people that are out on vacation and grabs the next person who is available.
Here are the formulas I have so far which rotates the list as needed but does not take into account if the person is out of the office the Vacation validation section was my attempt at seeing whether that person was out of the office, however I believe all of this could be coupled into one function/vba solution?:
Preparer Column: =IF(H3<>"NO","HOLIDAY",IF(OR(WEEKDAY(A3)={1,7}),"WEEKEND",IF(MATCH(F3,B3:D3,0),OFFSET('Input Data (For Schedule Prep)'!$C$2,MOD((ROW(A2)-3),COUNTA('Input Data (For Schedule Prep)'!C:C)-3),0),IF(AND(WEEKDAY(A3)<>{3,5},(K3="Yes")),'Input Data (For Schedule Prep)'!$G$2,OFFSET('Input Data (For Schedule Prep)'!$C$2,MOD((ROW(A2)-1),COUNTA('Input Data (For Schedule Prep)'!C:C)-1),0)))))
Approver Column: =IF(H3<>"NO","HOLIDAY",IF(OR(WEEKDAY(A3)={1,7}),"WEEKEND",IF(G3=D3,OFFSET('Input Data (For Schedule Prep)'!$C$2,MOD((ROW(A1)+1),COUNTA('Input Data (For Schedule Prep)'!C:C)-1),0),OFFSET('Input Data (For Schedule Prep)'!$C$2,MOD((ROW(A1)-2),COUNTA('Input Data (For Schedule Prep)'!C:C)-1),0))))