Eligibility Date formula 1 year service open enrollment Jan 1, Jul 1

starryexcel

New Member
Joined
Aug 30, 2016
Messages
6
I have searched and searched so I am now asking my first question.

I am looking for the formula to give me 1 year after date of hire, Jan 1 or Jul 1 whichever comes first to provided the date of open enrollment for 401K.

Cell A1 (Today's Date)
Cell J9 (Date of Hire)
Cell Q9 (Eligibility date, either 1/1 or 7/1, one year after cell J9)

Thank you for help "excel wonders of the world"...
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Hi starryexcel,

Welcome to the forums. This is a bit long, but it might do the trick...
<date(year(j9)+1,6,1)),date(year(j9)+1,6,1),and(date(year(j9)+1,month(j9),day(j9))><date(year(j9)+2,1,1)))
<date(year(j9)+1,6,1)),date(year(j9)+1,6,1),and(date(year(j9)+1,month(j9),day(j9))><date(year(j9)+1,6,1)),date(year(j9)+1,6,1),and(date(year(j9)+1,month(j9),day(j9))><date(year(j9)+2,1,1)))

Pasting my formula seems to be giving me issues for some reason...</date(year(j9)+2,1,1)))
</date(year(j9)+1,6,1)),date(year(j9)+1,6,1),and(date(year(j9)+1,month(j9),day(j9))></date(year(j9)+1,6,1)),date(year(j9)+1,6,1),and(date(year(j9)+1,month(j9),day(j9))></date(year(j9)+2,1,1)))
</date(year(j9)+1,6,1)),date(year(j9)+1,6,1),and(date(year(j9)+1,month(j9),day(j9))>
 
Last edited:
Upvote 0
Spreadsheet Formulas
CellFormula
Q9=IF(AND(DATE(YEAR(J9)+1,MONTH(J9),DAY(J9))>=DATE(YEAR(J9)+1,1,1),DATE(YEAR(J9)+1,MONTH(J9),DAY(J9))<DATE(YEAR(J9)+1,6,1)),DATE(YEAR(J9)+1,6,1),AND(DATE(YEAR(J9)+1,MONTH(J9),DAY(J9))>=DATE(YEAR(J9)+1,6,1),DATE(YEAR(J9)+1,MONTH(J9),DAY(J9))<DATE(YEAR(J9)+2,1,1)))

<tbody>
</tbody>

<tbody>
</tbody>
 
Last edited:
Upvote 0
This is not pretty ...

A​
B​
C​
1​
DoH
Date
2​
01 Jan 2016​
01 Jan 2017​
B2: {=INDEX(DATE(YEAR(A2) + {1,1,2}, {1,7,1}, 1), MATCH(1, DATEDIF(A2, DATE(YEAR(A2) + {1,1,2}, {1,7,1}, 1), "Y"), 0))}
3​
02 Jan 2016​
01 Jul 2017​
4​
01 Jul 2016​
01 Jul 2017​
5​
02 Jul 2016​
01 Jan 2018​
6​
31 Dec 2016​
01 Jan 2018​
 
Last edited:
Upvote 0
Hi shg,

That's a wicked formula. I'm going to have to study that one.

Though, I think one could look at it from a point of view that getting hired on Jan 1, 2016 would not make you eligible on Jan 1, 2017, but instead must wait until July 1, 2017 in which case the below formula should work for that. Though, I like your formula a lot. It's very concise.

Spreadsheet Formulas
CellFormula
Q9=IF(AND<font color="#008000">(DATE(YEAR(J9)+1,MONTH(J9),DAY(J9))>=DATE(YEAR(J9)+1,1,1),DATE(YEAR(J9)+1,MONTH(J9),DAY(J9))<date<font color="#0000FF">(YEAR(J9)+1,7,1)</date),
DATE(YEAR(J9)+1,7,1),IF<font color="#008000">(AND<font color="#0000FF">(DATE(YEAR(J9)+1,MONTH(J9),DAY(J9))>=DATE(YEAR(J9)+1,7,1),DATE(YEAR(J9)+1,MONTH(J9),DAY(J9))<date(YEAR(J9)+2,1,1)</date),DATE(YEAR(J9)+2,1,1)))

<tbody>
</tbody>

<tbody>
</tbody>
 
Last edited:
Upvote 0
Thank you very much for your replies, no wonder I could not figure out the formula, "wicked" is right!

Note: If they are hired on 1/1 or 7/1 they are eligible exactly one year from those dates. Effectively hired 1/1/15 or 7/1/15, eligible 1/1/16 or 7/1/16. Hired 1/2/15, eligible 7/1/16. Hired 7/2/15, eligible 1/1/17.
 
Upvote 0
This worked beautifully for me, thank you! Thank you!!!!

I have searched high and low for this formula for over a year!!!

Thanks, Shg...
 
Upvote 0
You're welcome.

I knew there had to be a more compact way:

A​
B​
C​
1​
DoH
DoE
2​
01-Jan-16​
01-Jan-17​
B2: =-HLOOKUP(-EDATE(A2, 12), -DATE(YEAR(A2) + {2,1,1}, {1,7,1}, 1), 1)
3​
02-Jan-16​
01-Jul-17​
4​
01-Jul-16​
01-Jul-17​
5​
02-Jul-16​
01-Jan-18​
6​
31-Dec-16​
01-Jan-18​
 
Upvote 0
Those pairs of asterisks should be closing curly braces.
 
Upvote 0
One final simplification:

A​
B​
C​
1​
DoH
DoE
2​
01-Jan-16​
01-Jan-17​
B2: =-LOOKUP(-EDATE(A2, 12), -DATE(YEAR(A2) + {2,1,1}, {1,7,1}, 1))
3​
02-Jan-16​
01-Jul-17​
4​
01-Jul-16​
01-Jul-17​
5​
02-Jul-16​
01-Jan-18​
6​
31-Dec-16​
01-Jan-18​
 
Upvote 0

Forum statistics

Threads
1,215,268
Messages
6,123,966
Members
449,137
Latest member
yeti1016

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top