Active Member
October 16, 2021
HI
I am trying to get the formula below to work. I understand that the third IF is not working because the second one causes the third condition to stop.
Please help with the right structure for this formula. Spreadsheet attached.
=IF(D1="New Hire",NETWORKDAYS(D2,EOMONTH(D2,0)),IF(AND(D1="LEAVER",EOMONTH(D2,-1)+1=D2),1,NETWORKDAYS(EOMONTH(D2,-1)+1,D2,IF(AND(D1="INCREMENT",EOMONTH(D2,-1)+1=D2),0,NETWORKDAYS(EOMONTH(D2,-1)+1,D2-1)))))
Moderators
January 31, 2022
Active Member
October 16, 2021
HI
I figured out the correct way to structure the IF function.
=IF(D21="New Hire",NETWORKDAYS(D22,EOMONTH(D22,0)),IF(AND(D21="LEAVER",EOMONTH(D22,-1)+1=D22),1,IF(D21="LEAVER",NETWORKDAYS(EOMONTH(D22,-1)+1,D2),IF(AND(D21="INCREMENT",EOMONTH(D22,-1)+1=D22),0,IF(D21="INCREMENT",NETWORKDAYS(EOMONTH(D22,-1)+1,D22-1))))))
All sorted now.
Thank you.
Trusted Members
October 17, 2018
1 Guest(s)