Forum Discussion
KanwalNo1
Nov 22, 2021Iron Contributor
Multi Column Return Array in Xlookup
@Sergei Baklan @Peter Bartholomew @lori_m @Chris_Gross When the Lookup value is a single cell, the Return_Array is returning two columns as desired in the following formula =XLOOKUP(C2,TAN!$B$1:...
- Nov 26, 2021
IMHO, that is correct behaviour. In second case you try to return array of array which is not supported.
KanwalNo1
Nov 26, 2021Iron Contributor
Ahh ! That is the Case ! I am amazed at how easily we can assume the things, which are yet to come into foray. May be Microsoft has given wings to our thoughts ! Thanks Sergei ! You have my admiration !
How do you learn and go about the things ? Will you share the secret recipe !
How do you learn and go about the things ? Will you share the secret recipe !
PeterBartholomew1
Nov 26, 2021Silver Contributor
If you are trying to return a two dimensional array of values, you can use INDEX/XMATCH/XMATCH or, if you have no need to look up the column indices, a hard-wired array {1,2} will return the first two columns.
It is a nuisance that, though arrays of arrays, are normal as input (essentially that is what Tables are) it is such hard work to get a 2D array returned.