Vlookup help

N

Novice Lee

I have two worksheets. Sheet 1 contains a number in column A and a name in
column C. On Sheet 2 I put my data from a csv file.

What I would like to do is vlookup Sheet 1 column C from the information on
Sheet 2 and return the number in column A that is associated with the name in
column C.
Ex.

Sheet 1 Sheet 2

A B C A B

33 N6-270-15 N6-270-75 35
34 N6-270-30 N6-270-15 33
35 N6-270-75 N6-270-15 33
36 N6-270-110 N6-270-30 34
 
S

smartin

Novice said:
I have two worksheets. Sheet 1 contains a number in column A and a name in
column C. On Sheet 2 I put my data from a csv file.

What I would like to do is vlookup Sheet 1 column C from the information on
Sheet 2 and return the number in column A that is associated with the name in
column C.
Ex.

Sheet 1 Sheet 2

A B C A B

33 N6-270-15 N6-270-75 35
34 N6-270-30 N6-270-15 33
35 N6-270-75 N6-270-15 33
36 N6-270-110 N6-270-30 34

VLOOKUP cannot do this, because the result you want is left of the range
to match (VLOOKUP requires the result to be in the same column or to the
right of the range to match).

But this will work in Sheet2 B1:

=INDEX(Sheet1!$A$1:$A$4,MATCH($A1,Sheet1!$C$1:$C$4,0),1)

Fill down.
 
M

Max

You can use an index/match ..
In Sheet2,
Assume data in A2 down
Put in B2:
=IF(ISNA(MATCH(A2,Sheet1!B:B,0)),"",INDEX(Sheet1!A:A,MATCH(A2,Sheet1!B:B,0)))
Copy down as far as required
voila?, hit the YES below
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:27,000 Files:200 Subscribers:70
xdemechanik
 
F

FloMM2

Max,
Your formula needs a little treeking:
Novice Lee has put the information on Sheet 1 in Columns A & C (not B).
So"
=IF(ISNA(MATCH(A2,Sheet1!B:B,0)),"",INDEX(Sheet1!A:A,MATCH(A2,Sheet1!B:B,0)))"
Should be
"=IF(ISNA(MATCH(A2,Sheet1!C:C,0)),"",INDEX(Sheet1!A:A,MATCH(A2,Sheet1!C:C,0)))"
hth
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top