Lookup reference

cmgish

New Member
Joined
Feb 15, 2021
Messages
8
Office Version
  1. 365
Platform
  1. Windows
So I have a table that contains 3 different columns of values. I need to write a formula based on a value that will not match exactly to what is in the table, and also based on the tenure of the employee.

1613398346064.png


Based on calculated data, an employee's calculated value is 2.23 and the employee's tenure is 'Year 3+' (i.e., been with the company longer than 3 years). I've tried INDEX/MATCH, but I can't seem to get it to work right. I would like the result of the formula to be the 'Level' (column M above). In this case, the result of the formula should be '4' since 2.23 is greater than 2.18 and less than 2.3 in column P. It seems like this should be simpler than what I'm making it. Any suggestions?
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Hi CMGish,

Can you use XL2BB or copy and paste as text so we don't have to retype your data.
 
Upvote 0
Hi CMGish,

Can you use XL2BB or copy and paste as text so we don't have to retype your data.
I would be happy to do so, but this is on a company computer and it won't allow me to download anything. Not even an Excel plugin
 
Upvote 0
I would be happy to do so, but this is on a company computer and it won't allow me to download anything. Not even an Excel plugin
Then just copy and paste as text so we don't have to re-type your data.
 
Upvote 0
Patients per hour (avg)% of BonusPayout
LevelYear 1Year 2Year 3+
1​
2.05​
2.30​
2.55​
100.0%
5,000.00​
2​
1.93​
2.18​
2.43​
90.0%
4,500.00​
3​
1.80​
2.05​
2.30​
75.0%
3,750.00​
4​
1.68​
1.93​
2.18​
60.0%
3,000.00​
5​
1.55​
1.80​
2.05​
50.0%
2,500.00​
6​
1.43​
1.68​
1.93​
30.0%
1,500.00​
7​
1.30​
1.55​
1.80​
20.0%
1,000.00​
8​
1.18​
1.43​
1.68​
10.0%
500.00​
 
Upvote 0
This is the formula I am using now (H7 is the cell that contains the value I need to "match", 2.23):

=IF(H7>=P6,1,IF(H7>=P7,2,IF(H7>=P8,3,IF(H7>=P9,4,IF(H7>=P10,5,IF(H7>=P11,6,IF(H7>=P12,7,IF(H7>=P13,8,"DNQ"))))))))

This formula works great as long as you know the tenure of the employee is "Year 3+". I am using this as a template for several different employees, so this formula will not work on an employee that has a tenure of "Year 1" or "Year 2" because those benchmarks are listed in columns N & O.
 
Upvote 0
How about
+Fluff 1.xlsm
GHIJKLMNOPQR
4Patients per hour (avg)% of BonusPayout
5LevelYear 1Year 2Year 3+
6YearPayout12.052.32.55100.00%5,000.00
732.23421.932.182.4390.00%4,500.00
831.82.052.375.00%3,750.00
941.681.932.1860.00%3,000.00
1051.551.82.0550.00%2,500.00
1161.431.681.9330.00%1,500.00
1271.31.551.820.00%1,000.00
1381.181.431.6810.00%500
Master
Cell Formulas
RangeFormula
I7I7=INDEX(M6:M13,XMATCH(H7,INDEX(N6:P13,,G7),-1))
 
Upvote 0
That might work great except that I am using Excel 2016 and I don't think XMATCH is available for this version. I guess I should update my profile, huh? Sorry about that.
 
Upvote 0
Ok, how about
+Fluff 1.xlsm
GHIJKLMNOPQR
4Patients per hour (avg)% of BonusPayout
5LevelYear 1Year 2Year 3+
6YearPayout12.052.32.55100.00%5,000.00
732.23421.932.182.4390.00%4,500.00
831.82.052.375.00%3,750.00
941.681.932.1860.00%3,000.00
1051.551.82.0550.00%2,500.00
1161.431.681.9330.00%1,500.00
1271.31.551.820.00%1,000.00
1381.181.431.6810.00%500
Master
Cell Formulas
RangeFormula
I7I7=INDEX(M6:M13,MATCH(TRUE,(H7>=INDEX(N6:P13,,G7)),0))
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Hi CMGish,

I see you already have an answer but here's my version:

CMGish.xlsx
MNOPQRSTU
4Patients per hour (avg)% of BonusPayoutTenure:2
5LevelYear 1Year 2Year 3+Employee Value:2.23
612.052.32.55100.00%5,000.00Result:2
721.932.182.4390.00%4,500.00
831.82.052.375.00%3,750.00
941.681.932.1860.00%3,000.00
1051.551.82.0550.00%2,500.00
1161.431.681.9330.00%1,500.00
1271.31.551.820.00%1,000.00
1381.181.431.6810.00%500
14
Sheet1
Cell Formulas
RangeFormula
U6U6=IFERROR(INDEX($M$6:$M$13,AGGREGATE(15,6,ROW($N$6:$N$13)-ROW($N$5)/((OFFSET($N$6,0,MIN(3,$U$4)-1,8)<=$U$5)),1)),"DNQ")
Cells with Data Validation
CellAllowCriteria
U4Whole numberbetween 1 and 99
M6:M13Whole numberbetween 1 and 99
 
Upvote 0
Solution

Forum statistics

Threads
1,215,059
Messages
6,122,918
Members
449,094
Latest member
teemeren

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