Good morning! I need help with a DATEDIF formula. This is my original formula:
=ROUND(IF(YEAR(AC93)=2018 & MONTH(AC93)=8,"0",DATEDIF(AC93,"8/1/2018","m")/12),0)
It works perfectly when the date in cell AC93 is 8/1/2018, which is what most of the 1,000+ employees I'm calculating years of service for have as a start date. We have outliers who started on 1/1/2019, however, so I need a formula that will return "0" as the result when the date is 8/1/2019 OR 1/1/2019.
This is my current formula to try to return that "0" when cell AC93 contains either of the two dates, which is returning a #NAME ? error:
=ROUND(OR(IFS(YEAR(AC93)=2018 & MONTH(AC93)=8, YEAR(AC93)=2019 & MONTH(AC93))=1,"0",DATEDIF(AC93,"8/1/2018","m")/12),0)
Can someone help me to correct my formula? I'd appreciate it very much!!!!
Thanks,
Kim
=ROUND(IF(YEAR(AC93)=2018 & MONTH(AC93)=8,"0",DATEDIF(AC93,"8/1/2018","m")/12),0)
It works perfectly when the date in cell AC93 is 8/1/2018, which is what most of the 1,000+ employees I'm calculating years of service for have as a start date. We have outliers who started on 1/1/2019, however, so I need a formula that will return "0" as the result when the date is 8/1/2019 OR 1/1/2019.
This is my current formula to try to return that "0" when cell AC93 contains either of the two dates, which is returning a #NAME ? error:
=ROUND(OR(IFS(YEAR(AC93)=2018 & MONTH(AC93)=8, YEAR(AC93)=2019 & MONTH(AC93))=1,"0",DATEDIF(AC93,"8/1/2018","m")/12),0)
Can someone help me to correct my formula? I'd appreciate it very much!!!!
Thanks,
Kim