# If cell equals another cell in another worksheet info entered into first worksheet

• Hi Guys,

Needing some help here can't seem to get the IF(COUNTIF) statement correct.

I have two worksheets - Sheet 1 and Sheet 2

Sheet 1 has two columns A and B
Sheet 2 has two columns B and C

Column B contains the same words/items on both sheets.
Column C contains the part numbers of the items in column B

I want to enter info into column B Sheet 1 - if that matches any cells in column B Sheet 2 range then the info from the same row of sheet 2 but Column C is put into column A of sheet 1

I can get it working so that either a yes or a no is entered into column A Sheet 1 but not the part number from column C Sheet 2

It's a little tricky to explain so hope the above makes some sense.

Thanks heaps champs!!

• Re: If cell equals another cell in another worksheet info entered into first workshee

Use this:

Sheet1 cell A1=INDEX(Sheet2!B:C,MATCH(B1,Sheet2!B:B,0),2)

Copy down for the rest of the column.
Dan

[SIZE=1]It's like asking a mechanic to fix your car, without actually taking your car to him. Post your code/file and you'll get much quicker and more accurate solutions to your problem.[/SIZE]

• Re: If cell equals another cell in another worksheet info entered into first workshee

Thanks Dan - perfect.

• Re: If cell equals another cell in another worksheet info entered into first workshee

or just
=VLOOKUP(B1,Sheet2!B:C,2,0)

## Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!