ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Lookup (https://www.excelbanter.com/excel-discussion-misc-queries/67585-lookup.html)

cbanks

Lookup
 
How do i lookup with 2 criteria..

I have the date in column A, column b i have the region (ex Region 1), and i
want to return whats in column C.

=LOOKUP(TODAY(),Auto!A:A,Auto!C:C)

i need it to be more like

=LOOKUP(TODAY() & b:b Region1,Auto!A:A,Auto!C:C)


Dave Peterson

Lookup
 
You can use this kind of 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.

So for your example:

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

Where A2 contains the data and B2 contains the region.



cbanks wrote:

How do i lookup with 2 criteria..

I have the date in column A, column b i have the region (ex Region 1), and i
want to return whats in column C.

=LOOKUP(TODAY(),Auto!A:A,Auto!C:C)

i need it to be more like

=LOOKUP(TODAY() & b:b Region1,Auto!A:A,Auto!C:C)


--

Dave Peterson

cbanks

Lookup
 
im sorry this just confused me.. i tried typing it in but it didnt work.. see
post labled Lookup with Multiple Criteria.. I reposted with a little more
info.

"Dave Peterson" wrote:

You can use this kind of 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.

So for your example:

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

Where A2 contains the data and B2 contains the region.



cbanks wrote:

How do i lookup with 2 criteria..

I have the date in column A, column b i have the region (ex Region 1), and i
want to return whats in column C.

=LOOKUP(TODAY(),Auto!A:A,Auto!C:C)

i need it to be more like

=LOOKUP(TODAY() & b:b Region1,Auto!A:A,Auto!C:C)


--

Dave Peterson



All times are GMT +1. The time now is 05:42 AM.

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