Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
DNSNIDER
 
Posts: n/a
Default Range of dates determine days

I'm looking for a formula that will allow me to enter an anniversary date and
have Excel calculate how many vacation days an employee has earned. Example:
If I put a date that is before 1979 in cell A1 than cell A2 will read 35, if
the date in A1 is between 1980 and 1984 than cell A2 will read 30, and so on
until I reach the present year. I would like to able to enter the date as
month, day, year in the same cell put I could just use 1 cell for month and
day and another for the year.
  #2   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

One possible way

=IF(A1="","",VLOOKUP(YEAR(A1),{0,35;1979,30;1985,2 5;1991,20;1996,15;2001,10},2))

this will allow you to type in the full date in A1
change the different year ranges if necessary. I would be interested where
in the US you get that many vacation days?

--
Regards,

Peo Sjoblom

(No private emails please, for everyone's
benefit keep the discussion in the newsgroup/forum)



"DNSNIDER" wrote in message
...
I'm looking for a formula that will allow me to enter an anniversary date
and
have Excel calculate how many vacation days an employee has earned.
Example:
If I put a date that is before 1979 in cell A1 than cell A2 will read 35,
if
the date in A1 is between 1980 and 1984 than cell A2 will read 30, and so
on
until I reach the present year. I would like to able to enter the date as
month, day, year in the same cell put I could just use 1 cell for month
and
day and another for the year.



  #3   Report Post  
dnsnider
 
Posts: n/a
Default

Now that I look at the numbers, they are inflated. I wish they were that
high. Actually the max is 30 days. Thanks for the help......


"Peo Sjoblom" wrote:

One possible way

=IF(A1="","",VLOOKUP(YEAR(A1),{0,35;1979,30;1985,2 5;1991,20;1996,15;2001,10},2))

this will allow you to type in the full date in A1
change the different year ranges if necessary. I would be interested where
in the US you get that many vacation days?

--
Regards,

Peo Sjoblom

(No private emails please, for everyone's
benefit keep the discussion in the newsgroup/forum)



"DNSNIDER" wrote in message
...
I'm looking for a formula that will allow me to enter an anniversary date
and
have Excel calculate how many vacation days an employee has earned.
Example:
If I put a date that is before 1979 in cell A1 than cell A2 will read 35,
if
the date in A1 is between 1980 and 1984 than cell A2 will read 30, and so
on
until I reach the present year. I would like to able to enter the date as
month, day, year in the same cell put I could just use 1 cell for month
and
day and another for the year.




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
Formating Dates for production schedule dpl7579 Excel Discussion (Misc queries) 1 January 11th 05 08:43 PM
Subracting Dates to come up with the # of days between them KimberlyC Excel Worksheet Functions 8 December 20th 04 09:46 PM
How do I find how many business days are between two dates S trainer Excel Worksheet Functions 2 December 15th 04 07:30 PM
can I use a range of dates as a criteria when using sumif? D@annyBoy Excel Worksheet Functions 5 December 2nd 04 01:37 PM
I have a list of dates that I need to count based on a date range ejb030353 Excel Worksheet Functions 4 November 24th 04 02:27 PM


All times are GMT +1. The time now is 09:54 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"