View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Calculation using a date

Hi,

You don't give us the formula for how you got 23 years 4 months but I assume
it's a mixture of formula and text concatenated so try this

=IF(LEFT(A1,FIND(" ",A1)-1)+0=20,680,IF(LEFT(A1,FIND("
",A1)-1)+0=10,640,IF(LEFT(A1,FIND(" ",A1)-1)+0=5,624,360)))

Mike

"KKH" wrote:

I have worksheets where I have a formula to calculate the number of years and
months of service. I would like to use that date to calculate excess annual
leave hours. (Example: calculation shows at 23 years 4 months, I need to use
this to calculate the following: 0 to 4 years =360; 5 to 9 years=624; 10-19
years=640; 20+ years=680) Note: The calculation for years and months will be
different on each employee. Can anyone help?