XYLookupλ() finds one or more values that match 1+ criteria in a column and 1+ critiera in a row.
XYLookupλ( ReturnArray, VFindValues1, VInArray1, HFindValues, HInArray, IfNotFound, MatchMode, SearchMode)
ReturnArray
(Required) A 2 dimensional range or table containing values to return
VFindValues
(Required) 1+ criteria to find in VInArray
VInArray
(Required) A column of values relating to each row in ReturnArray
HFindValues
(Required) 1+ critiera to find in HInArray
HInArray
(Required) A row of values (normally a header) relating to each column in ReturnArray.
IfNotFound
(Optional) What to return when lookups fail: Default is #NA.
MatchMode
(Optional) Specify:
0 - (Default) Exact match. If none found, return #NA.
-1- Exact match. If none found, return next smaller item.
1 - Exact match. If none found, return next larger item.
2 - A wildcard match where *, ?, and ~ have special meaning.
SearchMode
(Optional) Specify:
1 - (Default) Search from the start
-1- Search from the end
2 - Search list sorted in ascending order. Fails if unsorted.
-2- Search list sorted in descending order. Fails if unsorted.
The first example is a simple search for the price of Figs on June 1st.
In the second example, we are searching for multiple fruit on multiple dates that are not the exact dates in the timeline.