Select Cells based on crieteria from another worksheet

tonez90

New Member
Joined
May 4, 2010
Messages
6
Hi All,
I have a xcl spreadsheet which has two worksheets (Sheet1 and Sheet2).
Sheet1 has three columns (A, B, C).
Sheet2 has 6 columns (A,B,C,D,E,F).

What I am trying to achieve is as follows
If Sheet1!A2 matches the contents of a cell in Sheet 2 column A then copy the values from Sheet2 Columns C Column F to Sheet1 Columns B and C). h
Te numbers may not be the same in column A on each sheet but the numbers in Column A of Sheet1 are unique and are in no specific order.
If there is no match to the number in Sheet1!column A then put in a 0 in the two columns (B/C) on sheet1 else fill in the numbers from Sheet2.

As an example the value in Sheet1!A3 = 3947. This corresponds to Sheet2!C5. So copy the values from sheet2 to sheet1
However the value in Sheet1!A4 does not have any matching value in Sheet2. So place a value of 0 into sheet1 columns.

I hope I explained it properly.

Cheers Tony
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Sorry guys I forgot to mention I have tried the VLOOKUP function but get an #ref error

What I used was
=VLOOKUP(Sheet1!A3,Sheet2'!A6:A1000,2,0)

The first field is the value to compare against on sheet1
The second field is the range I am searching in sheet2
The third field is the column number (which is C)
The fourth field is exact match

I am stuck now.
Cheers
 
Upvote 0

Forum statistics

Threads
1,214,943
Messages
6,122,370
Members
449,080
Latest member
Armadillos

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