Vlookup with 4 Criteria

G

Gina_28

Hello,

I am trying to use a vlookup formula based on 4 criteria, in order to return
a name value, not numeric. On one worksheet I have several interviews set up.
Column A=Date, Column B=Time, Column C=Recruiter, Column D=Interview slot
number (they have up to 12 people scheduled at one time). I have named this
worksheet as list: INTERVIEWS. On my other worksheet, is a form. At the top,
the recruiter can fill in today's date in B1, The time of their interview
session in B2, and their name in B3. Below that information, starting in A8
is the Interview slot number, and then horizontally next to that are empty
cells with the name of the person being interviewed (B8) , and their
application number (C8), repeated 11 more times for all 12 interview slots.

I'm trying to create a vlookup formula in B8 that looks up the 3 criteria
filled in at the top (B1:3) as well as the interview slot# (A8) and returns
what's in column 6 on my Interview tab (the person's name). I fear that this
sounds immensely confusing, so if I need to attach my example I can. I've
tried sumproduct formulas which only work when returning a numeric value, as
well as vlookup formulas that are only returning errors. I'm not sure if
this multi-criteria is possible without VBA, but am crossing my fingers!!

Help!

Thanks,
Gina
 
R

Roger Govier

Hi Gina

One way.
First create a concatenated field on Interviews, somewhere to the right of
your data - I chose Column J.
In J2 Enter
=C2&"|"&A2&"|"&B2&"|"&D2
and copy down for the extent of your data.

Next create 3 named ranges - make the first 2 Dynamic so they will grow as
you add more data to sheet Interviews.
Insert>Name>Define
Name myTable
Refers to =Interviews!$A$1:INDEX(Interviews!J:J,COUNTA(Interviews!A:A))
then
Name Code
Refers to =Interviews!$J$1:INDEX(Interviews!J:J,COUNTA(Interviews!A:A))
then
Name Headings
Refers to =Interviews!$A$1:$J$1

In each case above, column I should be replaced with the last column of data
on Interviews, where you have placed your
concatenated formula.

On Sheet2, in cells A8 through A19 you will have the numbers 1 through 12
I have assumed that in row 7, starting with B7 you will have the column
headings that you wish to pick up from the Interview Sheet e.g. in B7 Name,
in C7 App. No etc.

In B8 Enter the following
=INDEX(myTable,
MATCH($B$3&"|"&$B$1&"|"&$B$2&"|"&$A8,Code,0),
MATCH(B$7,Headings,0))

Copy across for as many columns as required, and copy down through B9:B19
 
V

vishu

Hello,
Only one solution that is SUMPRODUCT formula. The best way for the numberis
put ISNUMBER before specified range. Let me know if you still have a doubt.
Or send me your formula, i will make a correction in that.
 
D

Dave Peterson

Saved from a previous post:

If you want exact matches for just two columns (and return a value from a
third), you could use:

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

(all in 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 only use the whole column in xl2007.

This returns the value in othersheet column C when column A and B (of
othersheet) match A2 and B2 of the sheet with the formula.

And you can add more conditions by just adding more stuff to that product
portion of the formula:

=index(othersheet!$d$1:$d$100,
match(1,(a2=othersheet!$a$1:$a$100)
*(b2=othersheet!$b$1:$b$100)
*(c2=othersheet!$c$1:$c$100),0))
 
G

Gina_28 via OfficeKB.com

Thank you soooo much!! I got everything to work perfectly!

Dave said:
Saved from a previous post:

If you want exact matches for just two columns (and return a value from a
third), you could use:

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

(all in 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 only use the whole column in xl2007.

This returns the value in othersheet column C when column A and B (of
othersheet) match A2 and B2 of the sheet with the formula.

And you can add more conditions by just adding more stuff to that product
portion of the formula:

=index(othersheet!$d$1:$d$100,
match(1,(a2=othersheet!$a$1:$a$100)
*(b2=othersheet!$b$1:$b$100)
*(c2=othersheet!$c$1:$c$100),0))
[quoted text clipped - 21 lines]
Thanks,
Gina
 

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