View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default VLOOKUP and Concatenation

Try the below. Please note that this is an array formula. Within the cell in
edit mode (F2) paste this formula and press Ctrl+Shift+Enter to apply this
formula. If successful in 'Formula Bar' you can notice the curly braces at
both ends like "{=<formula}"

From sheet1 to sheet2
with Sheet1 row 1
Col A Col B
12332 10

=INDEX(Sheet2!$C$1:$C$100,MATCH(1,(Sheet2!$A$1:$A$ 100=A1)*(LEFT(Sheet2!$B$1:$B$100,FIND("-",Sheet2!$B$1:$B$100)-1)+0=B1),0))

From sheet2 to sheet1
with row 1 data in sheet2 as
Col A Col B
12332 10-Jones

=INDEX(Sheet1!$C$1:$C$100,MATCH(1,(Sheet1!$A$1:$A$ 100=A1)*(Sheet1!$B$1:$B$100=LEFT(B1,FIND("-",B1)-1)+0),0))

If this post helps click Yes
---------------
Jacob Skaria


"PAL" wrote:

I have two worksheets with data that I need. There are more than 100 rows.

The first worksheet has many columns. Let's say:

Column A is a model number: 12332
Column B is a site number: 10
A and B are essentially unique identifiers
Column C - F is other data that I will need.

The second workshet has many columns also. Let's say:

Column A is the model number: 12332
Column B is the site number but different: 10-Jones
A and B are essentially unique identifiers, differing from the first work
sheet in that "B" is a longer version from the first worksheet (10 vs.
10-Jones).
Column C - F is other data that I will need.

How do I get C-F from the second worksheet lined up and onto the first
worksheet or vice versa C-F of the first onto the second.