Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Searching a column on 1 sheet for matches on another

Status
Not open for further replies.

jhetfield

Vendor
Apr 11, 2003
15
0
0
US
I have worksheet 1 with 5,000 part #s & their corresponding prices. I entered 1,000 of those #s on worksheet 2 (they can't be in ascending order (I.E 12,10,25,11).

Now I want to match these 1,000 part #s on worksheet 2 to the ones on worksheet 1 & input the prices that correspond to each part #. This way all I have to do is key in the part #s on worksheet 2 & the correct prices from worksheet 1 automatically are input.

Here's a layman’s way of writing the logical equivalent.

If cell in column A on worksheet 1 matches cell in column A on worksheet 2, than the cell adjacent column A on worksheet 2 equals the cell adjacent column A on worksheet 1.

Remember that while the part #s with the pricing on worksheet one (5,000 total) are in ascending order, the part #s that need the corresponding pricing I entered on worksheet two (1,000 total) can't be in any kind of order.


I'm a novice compared to most of the folks in this forum, If you could provide the string I need to use, that would be much appreciated.

Regards, Jason
 
Look in the help file for the worksheet function VLOOKUP and follow the examples.

If you can't get it to work the way you want, post again with details of what you tried and someone can assist you.
 
Put the cursor in A2 on worksheet 2 and put in the following function:

Code:
=vlookup(A1,NameOfWorksheet1!$A$1:$B$5000,2,FALSE)

Split down, this means:
Code:
=vlookup(
Do a vertical search
Code:
A1,
To find the contents of A1
Code:
NameOfWorksheet1!$A$1:$B$5000,
on Worksheet 1 in the fixed range a1 to B5000
Code:
2,
when found, take the information out of column 2
Code:
FALSE)
and search for an exact match, however the lists are sorted.

If this works well, drag the function from b2 down to the bottom of the list and feel happy about time saved. :)

All the best,

Carol, Berlin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top