Candyland25

New Member
Joined
Dec 2, 2016
Messages
33
Hello,

I am trying to lookup a data from table 1 to table 2 however, the vlookup is not matching locations and picking up the first role it finds: See below:
Column A Column B Column C Column D Column E Column F Column G Column H
Table 1
AustinAustin, Hill
75th80th90th75th80th90th
AustinProgram Analyst, Expert125000135000135500125200135300135900
Austin, HillProgram Manager145000155000155500145100155500155900
Austin, HillProgram Analyst, Senior125000135000135500125500135000135900
Austin, HillBusiness Analyst115000120000120500115200120500120700
Austin, HillProgram Manager149200157300157500149500157000157500

<colgroup><col><col><col><col><col span="4"></colgroup><tbody>
</tbody>

Column A Column B Column C Column D
Table 2
Percentile Range
AustinProgram Analyst, Expert75th125000
Austin, HillProgram Manager90th155900
Austin, HillProgram Analyst, Senior75th125500
Austin, HillBusiness Analyst80th120500
Austin, HillProgram Manager80th155500

<colgroup><col><col><col><col></colgroup><tbody>
</tbody>

<colgroup><col><col><col></colgroup><tbody>
</tbody>

This is my formula for Table two cell (125000)

=IF(AND($C15=$C$3,$A15=$C$2),VLOOKUP($B15,$B$2:$H$8,2,0),IF(AND($C15=$D$3,$A15=$C$2),VLOOKUP($B15,$B$2:$H$8,3,0),IF(AND($C15=$E$3,$A15=$C$2),VLOOKUP($B15,$B$2:$H$8,4,0),IF(AND($C15=$F$3,$A15=$F$2),VLOOKUP($B15,$B$2:$H$8,5,0),IF(AND($C15=$G$3,$A15=$F$2),VLOOKUP($B15,$B$2:$H$8,6,0),IF(AND($C15=$H$3,$A15=$F$2),VLOOKUP($B15,$B$2:$H$8,7,0)))))))

The issue is Program Manager listed with 155500 is wrong because it should be 157300 since the location is "Austin, Hill" at 80th percentile listed in table 1. How do I Vlookup to lookup Role based on Location and Percentile?

I also tried index and match formula but that didn't work.

Thank you all of your help.

Thank you
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Excel 2010
A
B
C
D
E
F
G
H
1
Austin
Austin, Hill
2
75th
80th
90th
75th
80th
90th
3
Austin
Program Analyst, Expert
125000
135000
135500
125200
135300
135900
4
Austin, Hill
Program Manager
145000
155000
155500
145100
155500
155900
5
Austin, Hill
Program Analyst, Senior
125000
135000
135500
125500
135000
135900
6
Austin, Hill
Business Analyst
115000
120000
120500
115200
120500
120700
7
Austin, Hill
Program Manager
149200
157300
157500
149500
157000
157500

<tbody>
</tbody>
Sheet4

Vlookup will return the first match it finds since you have Program manager listed twice the first Program manager will always be returned. You would need to make them unique like Program manager 1 and Program manager 2
 
Last edited:
Upvote 0
Re: Vlookup/Index/Match on Multiple Criteria/Conditions

Hi

can I ask how the formula would/should determine which of the 2 rows with 'Austin Hill/Program Manager' should be used/returned (e.g. rows 2 and 5 within the table)

Thanks
 
Upvote 0
Re: Vlookup/Index/Match on Multiple Criteria/Conditions

That's the part I couldn't figure out. The if statement only verifies "Austin Hill' in Table 1 but I couldn't figure out how to get Program Manager from Austin Hill's 80th salary instead of the Austin Program Manager.
 
Upvote 0
Yes I realize its' picking up the first program manager but how i modify my formula to pick up a salary based on location and role?
 
Upvote 0
Re: Vlookup/Index/Match on Multiple Criteria/Conditions

Your posted table shows

Austin, Hill Program Manager twice there is no Austin program manager. Is one of them suppose to be Austin?
 
Last edited:
Upvote 0
Assuming the first program manager should be Austin

Excel 2010
ABCDEFGH
1AustinAustin, Hill
275th80th90th75th80th90th
3AustinProgram Analyst, Expert125,000135,000135,500125,200135,300135,900
4AustinProgram Manager145,000155,000155,500145,100155,500155,900
5Austin, HillProgram Analyst, Senior125,000135,000135,500125,500135,000135,900
6Austin, HillBusiness Analyst115,000120,000120,500115,200120,500120,700
7Austin, HillProgram Manager149,200157,300157,500149,500157,000157,500
8
9
10
11
12
13
14PercentileRange
15AustinProgram Analyst, Expert75th125,000
16AustinProgram Manager90th155,500
17Austin, HillProgram Analyst, Senior75th125,500
18Austin, HillBusiness Analyst80th120,500
19Austin, HillProgram Manager80th157,000

<colgroup><col><col><col><col><col><col><col><col><col></colgroup><tbody>
</tbody>
Sheet4

Array Formulas
CellFormula
D15{=IF(A15=$C$1,INDEX($C$3:$E$7,MATCH(A15&B15,$A$3:$A$7&$B$3:$B$7,0),MATCH(C15,$C$2:$E$2,0)),INDEX($F$3:$H$7,MATCH(A15&B15,$A$3:$A$7&$B$3:$B$7,0),MATCH(C15,$F$2:$H$2,0)))}
D16{=IF(A16=$C$1,INDEX($C$3:$E$7,MATCH(A16&B16,$A$3:$A$7&$B$3:$B$7,0),MATCH(C16,$C$2:$E$2,0)),INDEX($F$3:$H$7,MATCH(A16&B16,$A$3:$A$7&$B$3:$B$7,0),MATCH(C16,$F$2:$H$2,0)))}
D17{=IF(A17=$C$1,INDEX($C$3:$E$7,MATCH(A17&B17,$A$3:$A$7&$B$3:$B$7,0),MATCH(C17,$C$2:$E$2,0)),INDEX($F$3:$H$7,MATCH(A17&B17,$A$3:$A$7&$B$3:$B$7,0),MATCH(C17,$F$2:$H$2,0)))}
D18{=IF(A18=$C$1,INDEX($C$3:$E$7,MATCH(A18&B18,$A$3:$A$7&$B$3:$B$7,0),MATCH(C18,$C$2:$E$2,0)),INDEX($F$3:$H$7,MATCH(A18&B18,$A$3:$A$7&$B$3:$B$7,0),MATCH(C18,$F$2:$H$2,0)))}
D19{=IF(A19=$C$1,INDEX($C$3:$E$7,MATCH(A19&B19,$A$3:$A$7&$B$3:$B$7,0),MATCH(C19,$C$2:$E$2,0)),INDEX($F$3:$H$7,MATCH(A19&B19,$A$3:$A$7&$B$3:$B$7,0),MATCH(C19,$F$2:$H$2,0)))}

<tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>
 
Upvote 0
1] As per Post #1 layout , change "Table1" A8, from "Austin, Hill" to "Austin"

and, change "Table2" A19, from "Austin, Hill" to "Austin"

2] In "Table2" D15, enter formula and copied down :

=INDEX(C$4:H$8,MATCH(1,INDEX((A15=A$4:A$8)*(B15=B$4:B$8),0),0),MATCH(C15,C$3:E$3,0)+MATCH(A15,C$2:H$2,0)-1)

Then, you can obtain 157,300 in D19

Regards
Bosco
 
Upvote 0

Forum statistics

Threads
1,214,522
Messages
6,120,019
Members
448,938
Latest member
Aaliya13

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