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))
MsBeverlee wrote:
Hi, KL -
Actually, the First Name and Last Name are in separate columns. Because
there are duplicate last names in my data, I need the VLOOKUP to look up both
of these and then return the rersult from column 3 only if both of these
criteria match, that way the correct result from column 3 is matched to the
correct last name.
For instance, in my example, $A2="Smith" and $B2="Cathy" and I want to
return the result of data in column 3 from my TRAVEL MANIFEST spreadsheet
(which is Flight Arrival Time), but only if both criteria ($A2 and $B2) are
met.
Thanks!
:
Hi MsBeverlee,
It sounds as if you want to lookup both First and Last Name in the same column. Is this true? If not please provide the range in
which you want to lookup C8.
--
KL
[MVP - Microsoft Excel]
RU:
http://www.mvps.ru/Program/Default.aspx
ES:
http://mvp.support.microsoft.com/?LN=es-es
EN:
http://mvp.support.microsoft.com/?LN=en-us
Profile:
https://mvp.support.microsoft.com/profile=AB32F8EE-8ED3-4AB9-ADDA-9E6C73C09A36
Hi, KL -
maybe you can help me with another problem related to this same function. I
used the formula you suggested below and it worked perfectly. Now I want to
know if it is possible to lookup 2 cell references, whereby both have to
match in order to yield the result. Here is my formula:
=IF(ISERROR(VLOOKUP(B8,'[TRAVEL
MANIFEST_Master.xls]Sheet1'!$A$2:$Q$66,3,FALSE)),"PENDING",VLOOKUP(B8,'[TRAVEL MANIFEST_Master.xls]Sheet1'!$A$2:$Q$66,3,FALSE))
Is is possible to VLOOKUP both B8 (Last Name) and C8 (First Name) and only
if BOTH match does it yield my result, otherwise it indicates "Pending"?
Thanks so much for your help!
:
See my reply to your identical question below. Replace "" by "PENDING"
--
KL
[MVP - Microsoft Excel]
RU:
http://www.mvps.ru/Program/Default.aspx
ES:
http://mvp.support.microsoft.com/?LN=es-es
EN:
http://mvp.support.microsoft.com/?LN=en-us
Profile:
https://mvp.support.microsoft.com/profile=AB32F8EE-8ED3-4AB9-ADDA-9E6C73C09A36
I am having the same problem. Can you also use this same formula but instead
of returning "0" have it yield "PENDING"?
:
Hi Paul,
=IF(ISNA(YourFormula),0,YourFormula)
--
Kind regards,
Niek Otten
| Hi Experts,
|
| Is there a formula/macro that I can apply to the results of a Vlookup
| function(=VLOOKUP($A$6:$A$119,Swe_Lookup,2,FALSE)) to replace the "Value Not
| Available Error" (#N/A) error with a 0?
|
| I am running Excel Pro on Windows XP Pro SP 2.
|
| I very much look forward to hearing from you.
|
| kind regards,
|
| Paul