Matching one sheet to another

fayeglock

New Member
Joined
Aug 10, 2006
Messages
7
Looking at col A in Sheet 1, I want to look to see if col A in Sheet 2 has a match. If so, I want to pull the value from col B in Sheet 2 and put it in col B in Sheet A. When there is no match, lookup is putting the closest value in. I want the unmatched rows to be blank or zero.

I've tried 'lookup' and 'vlookup' and 'If', but can't seem to get what I need.

Thanks for any tips you may have.
Faye
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Try this:

You may want to change the range: Sheet2!A1:B18

=IF(ISERROR(VLOOKUP(A1,Sheet2!A1:B18,2,FALSE)),"",VLOOKUP(A1,Sheet2!A1:B18,2,FALSE))


Have a great day,
Stan
 
Upvote 0
Stan,

A word of caution with the iserror() approach - it masks all errors, including syntactic ones in the formula construction:

=IF(ISERROR(VLKUP(A1,Sheet2!A1:B18,2,FALSE)),"",VLOOKUP(A1,Sheet2!A1:B18,2,FALSE))

...is not an error you'd want to mask. Better to check either specifically for the error you're monitoring for (using isna() in this case), or, more generally, for the condition that generates the error in the first place.
 
Upvote 0

Forum statistics

Threads
1,214,586
Messages
6,120,402
Members
448,958
Latest member
Hat4Life

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