ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   two criteria in a vlookup (https://www.excelbanter.com/excel-worksheet-functions/11270-two-criteria-vlookup.html)

CMAC

two criteria in a vlookup
 
how would i do a lookup to return a value if two conditions are met.
instead of =vlookup(a1,d1:h80,2,0) i would like a value to return if a1 and
b1 are matched?
thank you

c

Biff

Hi!

This all depends on how your lookup table is setup.

Need more detail.

Biff

-----Original Message-----
how would i do a lookup to return a value if two

conditions are met.
instead of =vlookup(a1,d1:h80,2,0) i would like a value

to return if a1 and
b1 are matched?
thank you

c
.


Peo Sjoblom

It's not clear what you mean, do you want to lookup A1 and B1 in one column
of the lookup table? If so use

=VLOOKUP(A1&B1,D1:H80,2,0)

if not post back

Regards,

Peo Sjoblom

"CMAC" wrote:

how would i do a lookup to return a value if two conditions are met.
instead of =vlookup(a1,d1:h80,2,0) i would like a value to return if a1 and
b1 are matched?
thank you

c


C Y via OfficeKB.com

I'm too am looking to return a value when 2 criterias are met, not a
combined set of words to make one. I want to look up a1 and then b1 in a
table where it will return xx.

columnA columnB value_to_return
Marketing Director John Doe

lookupA lookupB value_to_return
Marketing Director John Doe
Marketing Manager Joe Doe

--
Message posted via http://www.officekb.com

Biff

Hi!

Assume your lookup table is in the range A5:C6.

A1 and B1 are the lookup values.

In C1 enter this array formula with the key combo of
CTRL,SHIFT,ENTER:

=INDEX(C5:C6,MATCH(1,(A5:A6=A1)*(B5:B6=B1),0))

If no match is found #N/A will be returned.

To keep #N/A from being displayed enter this formula, also
an array:

=IF(ISERROR(MATCH(1,(A5:A6=A1)*(B5:B6=B1),0)),"",I NDEX
(C5:C6,MATCH(1,(A5:A6=A1)*(B5:B6=B1),0)))

Biff

-----Original Message-----
I'm too am looking to return a value when 2 criterias are

met, not a
combined set of words to make one. I want to look up a1

and then b1 in a
table where it will return xx.

columnA columnB value_to_return
Marketing Director John Doe

lookupA lookupB value_to_return
Marketing Director John Doe
Marketing Manager Joe Doe

--
Message posted via http://www.officekb.com
.


C Y via OfficeKB.com

Thanks, Biff. That's great! You have been very helpful.

-cy

--
Message posted via http://www.officekb.com


All times are GMT +1. The time now is 04:21 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com