a complicated vlookup?

bmwbuyer2007

Board Regular
Joined
Jul 19, 2007
Messages
82
hi all,

I have 2 sheets in my workbook, with very simple data:

Sheet 1

Count Product
3 A
11 A1
3 A2
1 A3
1 A4
1 A6

Sheet 2

Count Product
2 A
1 AL
1 AM
2 A3
3 A2
11 A5

I would like a formula in sheet 2, column C, which will look for the product code in sheet 1 and return the figure to the left of it, so sheet 2 will then look like:

Sheet 2

Count Product Count 2
2 A 3
1 AL
1 AM
2 A3 1
3 A2
11 A5 3

Any ideas please?

Thanks :)
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
How about:

=IF(COUNTIF(Sheet1!$B$2:$B$7, B2)=0, "", INDEX(Sheet1!$A$2:$A$7, MATCH(B2, Sheet1!$B$2:$B$7, 0)))
 
Upvote 0
Your formula in Sheet2 C2 would be:
=IF(COUNTIF(Sheet1!$B$2:$B$7,B2),INDEX(Sheet1!$A$2:$A$7,MATCH(B2,Sheet1!$B$2:$B$7,0)),"")

(copy down as required)
 
Upvote 0

Forum statistics

Threads
1,215,034
Messages
6,122,782
Members
449,095
Latest member
m_smith_solihull

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