Thread: Compare arrays
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bernard Liengme Bernard Liengme is offline
external usenet poster
 
Posts: 4,393
Default Compare arrays

If A1 of sheet1 has a part number; and A1:B4 has you list on Sheet2
The =VLOOKUP(A1,Sheet2!$A$1:$B$4,2) will do what you want.
However, I am taking 'part-number' to mean something like A1234
If they are real numbers (1234) you will need
=VLOOKUP(A1,Sheet2!$A$1:$B$4,2,FALSE)
to prevent Excel returning a near match (ie match 1234 with 1235 if 1234 is
missing in the list).

best wishes
--
Bernard V Liengme
Microsoft Excel MVP
www.stfx.ca/people/bliengme
remove caps from email

"youngster" wrote in message
...
I'm not sure if this is an array question or not so hopefully someone can
point me in the right direction if it's not.
I have a list(column) of part numbers on one worksheet that I want to
compare to a list on another sheet. If I find a match, I want to copy the
corresponding price (next column sheet 2) to the price column on sheet 1.
I tried =IF(A1='page2'!A1:A50, 'page2'!B1:B50,0) for cell B2. I was
hoping
that if I got a match in the A column, it would output the corresponding
value from the B column.
Any suggestions would be appreciated.