Overview: Trying to calculate the years of service for an employee sheet that contains two columns:
DOH = Date of Hire
DOT = Date of Termination (Note: most values in this field are blank)
Unable to figure out how to use the IF function when I'm comparing a Date of Termination (DOT) field that is populated to allow the if true & if false formulas to properly calculate.
With the formula below, if will calculate if the DOT is empty, but give an #INVALID OPERATION response if there is a value (i.e. date) in the DOT field.
=IF(DOT3 > 0, (DOT3 - DOH3) / 365, (TODAY() - DOH3) / 365)
I've tried using ISBLANK with similar results. Not sure what I'm missing here.