VLookup on two criteria - Not two dimensional

J

Jon C

Hi,

I'm trying to use Vlookup to select a value based on two criteria but to no
avail.

E.g.

Name Group Date
Jon Dev 1/2/2005
Jon Test 6/3/2005
Fred Dev 4/1/2005

I’d like to be able to search on Name and Group and return the date. I’d
normally use SumProduct however as the date is numeric, if there are multiple
entries the same it of course sums them….!

TIA,

Jon C
 
B

bj

one way to do it if the multiple entries are identical
set up a helper column just befor the date column
and use the formula
=name & Group
Do your vlookup for the concatinated value and it will return the first match
 
J

Jon C

I like your thinking. Thanks BJ.

bj said:
one way to do it if the multiple entries are identical
set up a helper column just befor the date column
and use the formula
=name & Group
Do your vlookup for the concatinated value and it will return the first match
 
J

JE McGimpsey

One way:

Say your target name and group are listed in E1 and E2. Then

=INDEX(C:C,MATCH(E1&E2,A1:A1000&B1:B1000,FALSE))
 
B

B. R.Ramachandran

Hi,

One possiblility is,

=SUMPRODUCT((A2:A4=E2)*(B2:B4=F2)*(C2:C4))/SUMPRODUCT((A2:A4=E2)*(B2:B4=F2))

The formula assumes that columns A, B, and C contain the source data, E and
F contain the search criteria, and G would return the output (date). It will
account for duplicate entries.

Regards,
B. R. Ramachandran
 
D

Dave Peterson

I like this syntax:

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

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.)

Adjust the range to match--but you can't use the whole column.
 

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