Vlookup and IF or Lookup with same item codes different region

maverickbenz

New Member
Joined
Jun 17, 2014
Messages
9
I have Sheet 1 that has my Region and Item Code that I want to pull the dollar amount over from Sheet 2 that has my Region, Code and Dollar Amount.

I have different Regions with the same Item Codes and obviously different Dollar amounts by each region.

Sheet 1 looks like this:

ABC
1REGIONCODEDOLLAR AMOUNT
2North1000
3North1200
4West1000
5West1200
6West1300
7Central800
8Central1000
9East1000
10East1300

<tbody>
</tbody>


Sheet 2 looks something like this:
ABC
1REGIONCODEDOLLAR AMOUNT
2North12004500.29
3East10001675.54
4West13007542.35
5Central10004831.25
6Central80012.54
7East1300158.45
8West100016783.35
9North1000457.55
10West12003482.37

<tbody>
</tbody>

I've tried with Lookup followed by Vlookup but it's giving me the wrong region values, so I think I'm missing something really simple here...

My challenge is that I have the same code in multiple regions.
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
=INDEX(Sheet2!C:C,MATCH(B2,IF(Sheet2!A:A=A2,Sheet2!B:B),0))

CTRL+SHIFT+ENTER
 
Upvote 0
I didn't know how far down your data goes so I just referred to the entire column (to make it easier to read/understand)... which is looking through 1,048,576 cells. Just adjust it for however large your data is. If it were only ten rows you could use:

=INDEX(Sheet2!$C$1:$C$10,MATCH(B2,IF(Sheet2!$A$1:$A$10=A2,Sheet2!$B$1:$B$10),0))
 
Upvote 0
Also there is another pretty cool way to do this with a non-array formula:

=INDEX(Sheet2!C:C,MATCH(1,INDEX((Sheet2!B:B=B2)*(Sheet2!A:A=A2),0,1),0))

Again you'll want to refer to your range instead of the entire columns... I only do this to make it easier to read and understand the formula.
 
Upvote 0

Forum statistics

Threads
1,214,968
Messages
6,122,506
Members
449,089
Latest member
RandomExceller01

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