as per your description i assume that
E3: =DATEDIF(A3,C3,"y") & " years " & DATEDIF(A3,C3,"ym") & " months", E3 contains the actual working time period.
Ex: 1 years 3 months...
But when you want to calculate the leaves you need to split the above string to 1 year = 12 month and addition 3 months = 15 months and based on this 15 months you need to assign the number of holidays.
So splitting the above string will be very difficult to implement, so what i suggest make a hidden cell where it will calculate the number of months for his/her working service.
Ex: consider E10 has hidden cell:
Write the following formulae in E10:
E10: =SUM(DATEDIF(A3,C3,"y")* 12, DATEDIF(A3,C3,"ym"))
DATEDIF(A3,C3,"y")* 12 -- convert years into months
DATEDIF(A3,C3,"ym") -- number of months and sum the both of them :)
now you validate the number of holidays based on E10 cell value like this:
=IF(E10<12,"23",IF(AND(E10>12,E10<=24),"28",IF(AND(E10>24,E10<=60),"29",IF(AND(E10>60,E10<=120),"31",""))))
Thanks,