Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Conditional Result based on Anniversary Date

I have a list of employee anniversary dates:
6/18/2003
1/28/1991
5/9/2005
12/14/2007
10/18/2006
4/1/2008
11/16/2004
Based on this list, if the anniversary month and day is reached I need 40
(hours) to be returned, otherwise 0 (hours). I dont care about the year, but
I need to keep the dates in this format.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,240
Default Conditional Result based on Anniversary Date

GregFIJI wrote:
I have a list of employee anniversary dates:
6/18/2003
1/28/1991
5/9/2005
12/14/2007
10/18/2006
4/1/2008
11/16/2004
Based on this list, if the anniversary month and day is reached I need 40
(hours) to be returned, otherwise 0 (hours). I dont care about the year, but
I need to keep the dates in this format.



=IF(OR(MONTH(TODAY())MONTH(A1),AND(MONTH(TODAY()) =MONTH(A1),DAY(TODAY())=DAY(A1))),40,0)
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Conditional Result based on Anniversary Date

That gets me alot closer but...
It still returns 40 on any hire date in 2008. None of the 2008 dates have
hit their anniversary yet!

"Glenn" wrote:

GregFIJI wrote:
I have a list of employee anniversary dates:
6/18/2003
1/28/1991
5/9/2005
12/14/2007
10/18/2006
4/1/2008
11/16/2004
Based on this list, if the anniversary month and day is reached I need 40
(hours) to be returned, otherwise 0 (hours). I dont care about the year, but
I need to keep the dates in this format.



=IF(OR(MONTH(TODAY())MONTH(A1),AND(MONTH(TODAY()) =MONTH(A1),DAY(TODAY())=DAY(A1))),40,0)

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Conditional Result based on Anniversary Date

Sorry...should have been more specific about the "I dont care about the year"
part...I only want 40 (hours) to return regardless of the amount of years
from the hire date to today.

"GregFIJI" wrote:

I have a list of employee anniversary dates:
6/18/2003
1/28/1991
5/9/2005
12/14/2007
10/18/2006
4/1/2008
11/16/2004
Based on this list, if the anniversary month and day is reached I need 40
(hours) to be returned, otherwise 0 (hours). I dont care about the year, but
I need to keep the dates in this format.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Conditional Result based on Anniversary Date

I edited the formula from Glenn to hardcode the 2008 issue...can someone help
me get rid of the hardcoding?
=IF(YEAR(C2)=2008,"0",IF(OR(MONTH(TODAY())MONTH(C 2),AND(MONTH(TODAY())=MONTH(C2),DAY(TODAY())=DAY( C2))),40,0))

"GregFIJI" wrote:

Sorry...should have been more specific about the "I dont care about the year"
part...I only want 40 (hours) to return regardless of the amount of years
from the hire date to today.

"GregFIJI" wrote:

I have a list of employee anniversary dates:
6/18/2003
1/28/1991
5/9/2005
12/14/2007
10/18/2006
4/1/2008
11/16/2004
Based on this list, if the anniversary month and day is reached I need 40
(hours) to be returned, otherwise 0 (hours). I dont care about the year, but
I need to keep the dates in this format.



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,240
Default Conditional Result based on Anniversary Date

GregFIJI wrote:
I edited the formula from Glenn to hardcode the 2008 issue...can someone help
me get rid of the hardcoding?
=IF(YEAR(C2)=2008,"0",IF(OR(MONTH(TODAY())MONTH(C 2),AND(MONTH(TODAY())=MONTH(C2),DAY(TODAY())=DAY( C2))),40,0))

"GregFIJI" wrote:

Sorry...should have been more specific about the "I dont care about the year"
part...I only want 40 (hours) to return regardless of the amount of years
from the hire date to today.

"GregFIJI" wrote:

I have a list of employee anniversary dates:
6/18/2003
1/28/1991
5/9/2005
12/14/2007
10/18/2006
4/1/2008
11/16/2004
Based on this list, if the anniversary month and day is reached I need 40
(hours) to be returned, otherwise 0 (hours). I dont care about the year, but
I need to keep the dates in this format.


Maybe this?

=IF(YEAR(C2)=YEAR(TODAY())...
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
Conditional Formatting Function for Anniversary Dates blucajun Excel Worksheet Functions 5 June 12th 08 09:06 AM
Conditional Result based on Multiple Columns AnnArborBrian Excel Worksheet Functions 6 May 10th 08 02:29 PM
Conditional Format based on forumula result Hendrik[_2_] Excel Discussion (Misc queries) 5 May 3rd 07 02:05 PM
Result Based on Date Criteria pobm62 Excel Discussion (Misc queries) 6 November 1st 06 10:07 PM
conditional formatting based on another cells formula result kstarkey Excel Discussion (Misc queries) 3 October 5th 05 09:07 PM


All times are GMT +1. The time now is 11:56 PM.

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"