VLOOKUP Formula help?

Sunshine8790

Board Regular
Joined
Jun 1, 2021
Messages
86
Office Version
  1. 365
Platform
  1. Windows
Bit of a complex question this time.
I want a formula in column E that will return a value from column K, based on whether Column B corresponds with Column J - using cell K2 as a guide.
I've been trying to play around with the VLOOKUP formula, but it's clearly not working. Help?

PTO COPY.xlsx
ABEFGHIJK
1NameHire DateAllotted TimeFiscal Year Begin:February
2PERSON A7/10/2023#N/ACurrent Date:9/7/2023
3PERSON B5/31/2023Less than 1 Year0
4PERSON C5/15/20231 Year10
5PERSON D4/26/20232 Years15
6PERSON E2/13/20233 Years15
7PERSON F9/26/20224 Years15
8PERSON G9/19/20225 Years20
9PERSON H9/12/2022
10PERSON I9/6/2022
11PERSON J8/22/2022
12PERSON K7/13/2022
13PERSON L6/20/2022
14PERSON M4/19/2022
15PERSON N3/14/2022
16PERSON O1/3/2022
17PERSON P10/25/2021
18PERSON Q10/18/2021
19PERSON R9/7/2021
20PERSON S8/23/2021
21PERSON T10/19/2020
22PERSON U6/28/2020
23PERSON V10/7/2019
24PERSON W9/16/2019
25PERSON X2/21/2019
26PERSON Y8/24/2018
27PERSON Z8/6/2018
Employee Summary
Cell Formulas
RangeFormula
E2E2=VLOOKUP(MOD(K2,1),J3:K7,2)
K2K2=TODAY()
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
For example:

Person A has a Hire date less than one year prior to the current date but not prior to February, so it should return a value of 0.

Person P has a hire date of 2 years prior to the current date that has a month that is after February (October), so even though we're in September - it still counts as 2 years instead of 1 and they would get 15 since this is their 2nd time working past February.
 
Upvote 0
For example:

Person A has a Hire date less than one year prior to the current date but not prior to February, so it should return a value of 0.

Person P has a hire date of 2 years prior to the current date that has a month that is after February (October), so even though we're in September - it still counts as 2 years instead of 1 and they would get 15 since this is their 2nd time working past February.
What about Person F and Person I?
 
Upvote 0
What about Person F and Person I?

Persons F through I all have after February hire dates.
They hit February once so far, so they would all be 10.
You made me re-think the value date though.... instead of the current date, I should be basing it off of Feb 1st of the current year.

So now my chart looks like this but I still need formula help to return the values based on the criteria I mentioned:

PTO COPY.xlsx
ABEFGHIJKLMNO
1NameHire DateAllotted Time2120232/1/2023
2PERSON A7/10/2023#N/AFiscal Year Start:2/1/20232/19/7/2023
3PERSON B5/31/2023Less than 1 Year0
4PERSON C5/15/20231 Year10
5PERSON D4/26/20232 Years15
6PERSON E2/13/20233 Years15
7PERSON F9/26/20224 Years15
8PERSON G9/19/20225 Years20
9PERSON H9/12/2022
10PERSON I9/6/2022
11PERSON J8/22/2022
12PERSON K7/13/2022
13PERSON L6/20/2022
14PERSON M4/19/2022
15PERSON N3/14/2022
16PERSON O1/3/2022
17PERSON P10/25/2021
18PERSON Q10/18/2021
19PERSON R9/7/2021
20PERSON S8/23/2021
21PERSON T10/19/2020
22PERSON U6/28/2020
23PERSON V10/7/2019
24PERSON W9/16/2019
25PERSON X2/21/2019
26PERSON Y8/24/2018
27PERSON Z8/6/2018
Employee Summary
Cell Formulas
RangeFormula
L1L1=MONTH(L2)
M1M1=DAY(L2)
O1O1=L1&"/"&M1&"/"&N1
E2E2=VLOOKUP(MOD(K2,1),J3:K8,2)
K2K2=O1
N1N1=YEAR(N2)
N2N2=TODAY()
 
Upvote 0
Do these results look like what you expect?
1694110763121.png
 
Upvote 0
@dreid1011 I'm going to say yes for the purpose of finding out the formula you used (in case I need it for future reference), but I'm gonna call it quits otherwise and just get a manual list done without formulas.
What formula did you use?
 
Upvote 0
@dreid1011 I'm going to say yes for the purpose of finding out the formula you used (in case I need it for future reference), but I'm gonna call it quits otherwise and just get a manual list done without formulas.
What formula did you use?
I used this:

Excel Formula:
=LOOKUP($K$2-$B2,{-365,0,365,730,1095,1460},$K$3:$K$8)

You can expand the K3:K8 range at need if you add more years, and would add another element to the array for each additional year added. The array values could be tweaked depending on how you want it to react on exactly Feb 1 of any given year though.
 
Upvote 0
Solution

Forum statistics

Threads
1,223,880
Messages
6,175,155
Members
452,615
Latest member
bogeys2birdies

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