is there a way to search with vlookup to match more than 1 column

P

puppy

I know how to use vlookup() but I have found a new problem.

Say I have a BIG sheet and want to search it for MORE THAN ONE match in
multiple columns.

Further explination:

I do a vlookup() of the table, but there are multiple matches with the first
paramater.

So a second paramater is given and so from the first match, I want a second
match made.

Is this possible?

thanks much in advance.
 
C

CLR

You can only get one return using a VLOOKUP. But, you can get tricky and
use CONCATENATION to create a new lookup column and then look up
CONCATENATED combinations...........
something like...........

=VLOOKUP(A1&B1,D:E,2,FALSE)

where column D has the CONCATENATED value combinations you're looking
for............

Vaya con Dios,
Chuck, CABGx3
 
D

Dave Peterson

I like this syntax:

=index(othersheet!$c$1:$c$10,
match(1,(a2=othersheet!$a$1:$a$100)*(b2=othersheet!$b$1:$b$100),0))
 
B

Biff

OR, you could combine elements of both Chuck's and Dave's examples and does
not need a concatenated helper column.

=INDEX(range,MATCH(A1&B1,AA1:AA10&AB1:AB10,0))

Entered as an array with the key combo of CTRL,SHIFT,ENTER.

Biff
 
D

Dave Peterson

I should have added this:

This is an array formula. Hit ctrl-shift-enter instead of enter. If you do it
correctly, excel will wrap curly brackets {} around your formula. (don't type
them yourself.)
 
D

Dave Peterson

But if your data looks like:

aaa bbbb
aaab bbb
a aabbbb

It could yield the incorrect results.

=INDEX(range,MATCH(A1&char(10)&B1,AA1:AA10&char(10)&AB1:AB10,0))

(using alt-enter as a separator--if it's not used within the strings.)
 
B

Biff

Good point!

Biff

Dave Peterson said:
But if your data looks like:

aaa bbbb
aaab bbb
a aabbbb

It could yield the incorrect results.

=INDEX(range,MATCH(A1&char(10)&B1,AA1:AA10&char(10)&AB1:AB10,0))

(using alt-enter as a separator--if it's not used within the strings.)
 

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