filtered list question

B

Bob B

I want to autofilter a list and then run a vlookup based on the criteria
used. How do you reference the first cell of a filtered list?
 
D

Domenic

Assumptions:

A2:C10 contains your data

E1 contains your lookup value

You wish to return the corresponding value in Column C

Formula:

=VLOOKUP(E1,IF(SUBTOTAL(3,OFFSET(A2:A10,ROW(A2:A10)-MIN(ROW(A2:A10)),0,1)
),A2:C10),3,0)

....confirmed with CONTROL+SHIFT+ENTER, not just ENTER. Adjust the
formula accordingly.

Hope this helps!
 
B

Bob B

Domenic,
How do I get E1 (lookup value) to = the filtered criteria? In your
assumption, say that A contains the month you wish to filter. I need my
lookup value to = whichever month you selected to filter. Sorry for not
being clear.
 
D

Domenic

Is this what you mean?

=INDEX(A2:A10,MATCH(TRUE,INDEX(SUBTOTAL(3,OFFSET(A2:A10,ROW(A2:A10)-MIN(R
OW(A2:A10)),0,1))>0,0),0))
 
Top