Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Use of arrays | Excel Worksheet Functions | |||
How do I compare cells and if FALSE compare to next cell in EXCEL | Excel Worksheet Functions | |||
Arrays | Excel Discussion (Misc queries) | |||
3D Arrays | Excel Worksheet Functions | |||
Arrays | Excel Worksheet Functions |