Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,814
Default Vacation Accrual

I have read through the past posts and havent found exactly what I am looking
for. I need to have a formula that will tell me how many months an employee
has worked after his anniversary THIS year, up to his anniversary NEXT year.
I am able to make a formula that will calculate for this year, but when the
year changes, it messes up. EX. Ann. date of 10/1/08. On 11/1/08 it should
say "1", on 12/1/08 is should say "2", on 1/1/09 is should say "3", etc....
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 471
Default Vacation Accrual

Assuming F4 has your 10/1/08 BD, then this should work:

=INT((F7-$F$4)/(365/12))

F7 has the date in question. The result will return the number of whole
months since the anniversary. And the definition of a whole month is 365/12
or 30.4 days.

"Steve" wrote:

I have read through the past posts and havent found exactly what I am looking
for. I need to have a formula that will tell me how many months an employee
has worked after his anniversary THIS year, up to his anniversary NEXT year.
I am able to make a formula that will calculate for this year, but when the
year changes, it messes up. EX. Ann. date of 10/1/08. On 11/1/08 it should
say "1", on 12/1/08 is should say "2", on 1/1/09 is should say "3", etc....

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,814
Default Vacation Accrual

Thanks so much Mike. I am alittle confused (image that). I see that $F$4 is
the employees date of hire, what is f7? You said date in question, but I
guess I just don't understand.

Thanks so much!!

"Mike H." wrote:

Assuming F4 has your 10/1/08 BD, then this should work:

=INT((F7-$F$4)/(365/12))

F7 has the date in question. The result will return the number of whole
months since the anniversary. And the definition of a whole month is 365/12
or 30.4 days.

"Steve" wrote:

I have read through the past posts and havent found exactly what I am looking
for. I need to have a formula that will tell me how many months an employee
has worked after his anniversary THIS year, up to his anniversary NEXT year.
I am able to make a formula that will calculate for this year, but when the
year changes, it messes up. EX. Ann. date of 10/1/08. On 11/1/08 it should
say "1", on 12/1/08 is should say "2", on 1/1/09 is should say "3", etc....

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 471
Default Vacation Accrual

F7 would be today or whatever date you're trying to determine to compare
with. As I thought about this over teh weekend, I really don't think this
does exactly what you want it to, however. Let me think on it a little more.

"Steve" wrote:

Thanks so much Mike. I am alittle confused (image that). I see that $F$4 is
the employees date of hire, what is f7? You said date in question, but I
guess I just don't understand.

Thanks so much!!

"Mike H." wrote:

Assuming F4 has your 10/1/08 BD, then this should work:

=INT((F7-$F$4)/(365/12))

F7 has the date in question. The result will return the number of whole
months since the anniversary. And the definition of a whole month is 365/12
or 30.4 days.

"Steve" wrote:

I have read through the past posts and havent found exactly what I am looking
for. I need to have a formula that will tell me how many months an employee
has worked after his anniversary THIS year, up to his anniversary NEXT year.
I am able to make a formula that will calculate for this year, but when the
year changes, it messes up. EX. Ann. date of 10/1/08. On 11/1/08 it should
say "1", on 12/1/08 is should say "2", on 1/1/09 is should say "3", etc....

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,814
Default Vacation Accrual


Again Mike, thanks for the information. I have plugged it in, and it is not
giving me what I am looking for. It is giving me the total number of months
since their start date thru today. It is hard to describe what I am trying
to accomplish, but for each employee, I need a formula that will calculate
the number of months since their LAST anniversary, provided it is in that
calendar year, up to their next anniversary of the next calendar year? I
hope that makes sense...

"Mike H." wrote:

F7 would be today or whatever date you're trying to determine to compare
with. As I thought about this over teh weekend, I really don't think this
does exactly what you want it to, however. Let me think on it a little more.

"Steve" wrote:

Thanks so much Mike. I am alittle confused (image that). I see that $F$4 is
the employees date of hire, what is f7? You said date in question, but I
guess I just don't understand.

Thanks so much!!

"Mike H." wrote:

Assuming F4 has your 10/1/08 BD, then this should work:

=INT((F7-$F$4)/(365/12))

F7 has the date in question. The result will return the number of whole
months since the anniversary. And the definition of a whole month is 365/12
or 30.4 days.

"Steve" wrote:

I have read through the past posts and havent found exactly what I am looking
for. I need to have a formula that will tell me how many months an employee
has worked after his anniversary THIS year, up to his anniversary NEXT year.
I am able to make a formula that will calculate for this year, but when the
year changes, it messes up. EX. Ann. date of 10/1/08. On 11/1/08 it should
say "1", on 12/1/08 is should say "2", on 1/1/09 is should say "3", etc....



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 471
Default Vacation Accrual

This should do it:

=IF(MONTH(A4)-MONTH(NOW())<0,MONTH(NOW())-MONTH(A4)+IF(DAY(A4)DAY(NOW()),-1,0),"")

A4 is the birthdate you are evaluating and Now() is today (could substitute
a date for now() if you wish to evaluate on another date besides today.


HTH
"Steve" wrote:


Again Mike, thanks for the information. I have plugged it in, and it is not
giving me what I am looking for. It is giving me the total number of months
since their start date thru today. It is hard to describe what I am trying
to accomplish, but for each employee, I need a formula that will calculate
the number of months since their LAST anniversary, provided it is in that
calendar year, up to their next anniversary of the next calendar year? I
hope that makes sense...

"Mike H." wrote:

F7 would be today or whatever date you're trying to determine to compare
with. As I thought about this over teh weekend, I really don't think this
does exactly what you want it to, however. Let me think on it a little more.

"Steve" wrote:

Thanks so much Mike. I am alittle confused (image that). I see that $F$4 is
the employees date of hire, what is f7? You said date in question, but I
guess I just don't understand.

Thanks so much!!

"Mike H." wrote:

Assuming F4 has your 10/1/08 BD, then this should work:

=INT((F7-$F$4)/(365/12))

F7 has the date in question. The result will return the number of whole
months since the anniversary. And the definition of a whole month is 365/12
or 30.4 days.

"Steve" wrote:

I have read through the past posts and havent found exactly what I am looking
for. I need to have a formula that will tell me how many months an employee
has worked after his anniversary THIS year, up to his anniversary NEXT year.
I am able to make a formula that will calculate for this year, but when the
year changes, it messes up. EX. Ann. date of 10/1/08. On 11/1/08 it should
say "1", on 12/1/08 is should say "2", on 1/1/09 is should say "3", etc....

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,814
Default Vacation Accrual

I have plugged this in, and I believe it is working! Thanks so much for your
assistance!

"Mike H." wrote:

This should do it:

=IF(MONTH(A4)-MONTH(NOW())<0,MONTH(NOW())-MONTH(A4)+IF(DAY(A4)DAY(NOW()),-1,0),"")

A4 is the birthdate you are evaluating and Now() is today (could substitute
a date for now() if you wish to evaluate on another date besides today.


HTH
"Steve" wrote:


Again Mike, thanks for the information. I have plugged it in, and it is not
giving me what I am looking for. It is giving me the total number of months
since their start date thru today. It is hard to describe what I am trying
to accomplish, but for each employee, I need a formula that will calculate
the number of months since their LAST anniversary, provided it is in that
calendar year, up to their next anniversary of the next calendar year? I
hope that makes sense...

"Mike H." wrote:

F7 would be today or whatever date you're trying to determine to compare
with. As I thought about this over teh weekend, I really don't think this
does exactly what you want it to, however. Let me think on it a little more.

"Steve" wrote:

Thanks so much Mike. I am alittle confused (image that). I see that $F$4 is
the employees date of hire, what is f7? You said date in question, but I
guess I just don't understand.

Thanks so much!!

"Mike H." wrote:

Assuming F4 has your 10/1/08 BD, then this should work:

=INT((F7-$F$4)/(365/12))

F7 has the date in question. The result will return the number of whole
months since the anniversary. And the definition of a whole month is 365/12
or 30.4 days.

"Steve" wrote:

I have read through the past posts and havent found exactly what I am looking
for. I need to have a formula that will tell me how many months an employee
has worked after his anniversary THIS year, up to his anniversary NEXT year.
I am able to make a formula that will calculate for this year, but when the
year changes, it messes up. EX. Ann. date of 10/1/08. On 11/1/08 it should
say "1", on 12/1/08 is should say "2", on 1/1/09 is should say "3", etc....

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
vacation accrual formula jd_dps Excel Discussion (Misc queries) 3 January 29th 09 08:14 PM
Vacation accrual Spreadsheet TimBeau Excel Discussion (Misc queries) 6 May 28th 08 03:40 PM
Vacation/Sick accrual [email protected] Excel Worksheet Functions 0 February 15th 06 07:43 PM
Please help!! Vacation Accrual Formula MissNadine Excel Worksheet Functions 1 August 19th 05 02:32 AM
Vacation Accrual Formula MissNadine Excel Worksheet Functions 0 August 18th 05 04:02 AM


All times are GMT +1. The time now is 12:26 AM.

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

About Us

"It's about Microsoft Excel"