Difference between Two Dates with 3 outcomes

New Contributor

Is there any way to create a formula that would spit out 3 different values depending on the difference of two dates? 

For example: 

Date 1 < Date 2 = 3-5Y

Date 1 = Date 2 = 5-7Y

Date 1 > Date 2 = 7-9Y 

 

thanks in advance 

1 Reply

@Exwiz2485 

=IF(A2<B2,"3-5Y",IF(A2=B2,"5-7Y",IF(A2>B2,"7-9Y")))

You can use a nested IF formula. If you work with Office365 or 2021 you can apply IFS.

difference between 2 dates.JPG