Forum Discussion
liz123395
Apr 17, 2024Copper Contributor
YEARFRAC won't turn negative
Hi there, I am wanting the yearfrac formula to turn negative if the 2nd date is before the 1st date. So in the below example it would be -.083 instead of just giving me the difference. Is there ...
OliverScheurich
Apr 17, 2024Gold Contributor
=IF(A1<B1,YEARFRAC(A1,B1),-YEARFRAC(A1,B1))
Would this formula be acceptable? It returns the intended result in my sheet.