#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Compare arrays

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.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 772
Default Compare arrays

If there will only be one entry on the second sheet, look into doing a
vlookup, it will find a value in a column and return the values from another
column.
--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"youngster" wrote:

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.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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.



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Compare arrays

Thank you, the FALSE did the trick.

"Bernard Liengme" wrote:

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.




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Use of arrays DKS Excel Worksheet Functions 1 November 30th 06 08:38 PM
How do I compare cells and if FALSE compare to next cell in EXCEL Cindie Excel Worksheet Functions 0 March 24th 06 05:29 PM
Arrays Tobro88 Excel Discussion (Misc queries) 3 November 18th 05 11:28 PM
3D Arrays DB Excel Worksheet Functions 2 October 10th 05 03:50 PM
Arrays Dan Excel Worksheet Functions 3 September 15th 05 07:36 AM


All times are GMT +1. The time now is 04:37 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"