Forum Discussion
lulbabyada
Apr 22, 2020Copper Contributor
trying to use datedif function
trying to subtract two dates, hire date and termination date to get employee tenure. Hire date has a vlookup function =IF(ISERROR(VLOOKUP(A2,staff!A:H,8,FALSE)),"Not hired",(VLOOKUP(A2,staff!A...
SergeiBaklan
Apr 22, 2020Diamond Contributor
- lulbabyadaApr 22, 2020Copper Contributor
hI Sergei thanks, that worked for the fields that had both a hire date and a term date, but what about the ones that produced 0 due to having "Active" as text in the term date field or "Not hired" in the hire date field? SergeiBaklan
- SergeiBaklanApr 22, 2020Diamond Contributor
I didn't find "Active" first time, my guess was it shall be TODAY(). With that it could be
Perhaps you may give possible combinations of dates and texts, it's bit hard to make a guess what VLOOKUP():s shall return.
- lulbabyadaApr 22, 2020Copper Contributor
That is my data sheet, I need function for termination date that will show when they were terminated but if the field is blank due to no termination yet I need it to say todays date so that I can subtract term date and hire date to get tenure column to have the date difference