Is it possible to filter an array using a single formula (without autofilter, VBA, or additional columns)?
For example, I have the following spreadsheet:
A | B | C
--------------------
1| ID | Class | Value
2| 1 | A | V1
3| 1 | B | V2
4| 2 | A | V3
5| 3 | B | V4
6| 3 | B | V5
I want to use a subset of this array in VLOOKUP. Namely, I only want to match against those rows where class is "B". So I was hoping I could use something like the following
=VLOOKUP(A3, FILTER_FUNC(A:C, B="B"), 3, false)
where FILTER_FUNC is some type of function or expression that returns an array that only contains those rows that meet the condition.
=VLOOKUP(A2,IF(B1:B3="B",A1:C3,""),1,FALSE)
Ctrl+Shift+Enter
to enter.