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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Lookup in Excel

Status
Not open for further replies.

pandabear1

Technical User
Oct 14, 2004
887
CA
I have a spreadsheet (say spreadsheet 1)with part numbers in column A that I would like to compare to another spreadsheet (say spreadsheet 2) with part numbers in column A and if they match take the price from column G of the second spreadsheet and place that price into the first spreadsheet in column D.
I am no Excel guru by any means and have done some reading and am not sure which type of formula to use or the exact formula I would need. Any help would be greatly apreciated. Thanks in advance.
 
Vlookup would be my choice. You can create the formula in workbook1 but I would say that the easiest way is: in Workbook2 create a named range based including all your data. Assume you call this myLookupTable

Create a new sheet in Workbook2. Copy a sample of the data from workbook1 into this sheet.
In column D (I am assuming row 2) type:
=vlookup(A2,myLookupTable,7,0)
or
=if(isna(vlookup(A2,myLookupTable,7,0),"no match",vlookup(A2,myLookupTable,7,0))

Now copy the formula and paste it into Workbook1.

Delete the sheet you created in workbook2.

Note that the lookup will be much faster if workbook2 is open. Indeed if it isn't you may have to wait hours!.
Edit,Links .... is a reliable way of opening the linked workbook.

Gavin
 
didn't work, I must have done something wrong as I got a $0.00 value.
what i did was in the same workbook sheet 1 has the part number and the column D that i want the data to populate, sheet 2 in the same workbook has the part number I want to complare to sheet 1 and the price in column D.
So I understand this, in your formula what is the 7 for?
With what I have done is the same formula and instructions appropriate? Thanks again for your help so far.
 
did some more reading and experimenting and got it to work, thanks for your help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top