mardi 7 janvier 2020

Excel IF statement help needed

I have searched and tried different things but I just cant seem to make this formula work and need some help please! Background on what I am trying to achieve:

There are two dates in play here,

Application date (cell B5) 'which everyone has

and

Retirement date (cell F6) 'which only some people have, provided they have retired

If there is no retirement date , return nothing (works)

If the difference between F6 and B5 is greater than or equal to 15 months, display RTR>15 (works)

Otherwise display nothing even if difference is negative (gives #NUM value in cell when date difference is less than 15)


Formula I used:

=IF(F6="","",IF(DATEDIF(F6,B5,"m")>=15,"RTR>15",""))

It all works except when the difference between the two dates is less than 15 then it displays #NUM in the cell in red. So I am assuming I need to have a condition in there to handle negative values? but how can I fix this?

Thanks,

Ak

Aucun commentaire:

Enregistrer un commentaire