#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 23
Default Years of Service

I'm trying to create a "database" for our team so that we can then create a
mail merge for our certificates for anniversaries with the company. I found a
formula that will give me the years of service with some text.

=DATEDIF(G10,$C$1,"y") & " years of service "

G10 = the start date
C1 = today's date

This result gives me "2 years of service" which is great for all but 1 year
of service. Can anyone help me with an if statement for the instance when it
is the first anniversary and I want it to say "1 year of service".
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,203
Default Years of Service


=IF(DATEDIF(G10,C1,"y")1,DATEDIF(G10,C1,"y") & " years of service
",DATEDIF(G10,C1,"y") & " year of service ")

should do the trick for you.

"Erinayn" wrote:

I'm trying to create a "database" for our team so that we can then create a
mail merge for our certificates for anniversaries with the company. I found a
formula that will give me the years of service with some text.

=DATEDIF(G10,$C$1,"y") & " years of service "

G10 = the start date
C1 = today's date

This result gives me "2 years of service" which is great for all but 1 year
of service. Can anyone help me with an if statement for the instance when it
is the first anniversary and I want it to say "1 year of service".

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 23
Default Years of Service

That was exactly what I needed. Thanks!!

2 perfect answers in like 15 minutes. I'm going to look like a super star!

"JLatham" wrote:


=IF(DATEDIF(G10,C1,"y")1,DATEDIF(G10,C1,"y") & " years of service
",DATEDIF(G10,C1,"y") & " year of service ")

should do the trick for you.

"Erinayn" wrote:

I'm trying to create a "database" for our team so that we can then create a
mail merge for our certificates for anniversaries with the company. I found a
formula that will give me the years of service with some text.

=DATEDIF(G10,$C$1,"y") & " years of service "

G10 = the start date
C1 = today's date

This result gives me "2 years of service" which is great for all but 1 year
of service. Can anyone help me with an if statement for the instance when it
is the first anniversary and I want it to say "1 year of service".

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,203
Default Years of Service

Actually, it won't work 'properly' for zero years of service. This would
handle even that situation properly:

=IF(DATEDIF(G10,C1,"y")=1,DATEDIF(G10,C1,"y") & " year of service
",DATEDIF(G10,C1,"y") & " years of service ")



"Erinayn" wrote:

That was exactly what I needed. Thanks!!

2 perfect answers in like 15 minutes. I'm going to look like a super star!

"JLatham" wrote:


=IF(DATEDIF(G10,C1,"y")1,DATEDIF(G10,C1,"y") & " years of service
",DATEDIF(G10,C1,"y") & " year of service ")

should do the trick for you.

"Erinayn" wrote:

I'm trying to create a "database" for our team so that we can then create a
mail merge for our certificates for anniversaries with the company. I found a
formula that will give me the years of service with some text.

=DATEDIF(G10,$C$1,"y") & " years of service "

G10 = the start date
C1 = today's date

This result gives me "2 years of service" which is great for all but 1 year
of service. Can anyone help me with an if statement for the instance when it
is the first anniversary and I want it to say "1 year of service".

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Years of Service Calculation JS Excel Worksheet Functions 2 April 24th 06 07:47 PM
Age and Number Years of Service Johnhax Excel Discussion (Misc queries) 3 April 17th 06 06:44 PM
Years of Service Question? Kane New Users to Excel 2 February 3rd 06 03:05 PM
Years of Service Question? Stefi New Users to Excel 0 February 3rd 06 11:27 AM
Years of service... Kane New Users to Excel 3 January 10th 05 07:11 AM


All times are GMT +1. The time now is 03:29 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"