Forum Discussion
Match Columns While Making Space for Dupicates
The first problem my be that I use Excel 365 and only write solutions that use that version to the full.
The next problem is that MAP that should enable results to be stacked in the same pattern as the mapped array only works for functions that return scalars.
The Lambda function I used to stack a single value from list1 with corresponding values from list2 was
Stackλ
= LAMBDA(u, LAMBDA(v, IFERROR(HSTACK(v, FILTER(u, u=v, "")),"")));which I used in the worksheet formula
= MAPλ(list1, Stackλ(list2))
The catch is that MAPλ is not the in-built Excel function, though it uses it. The Lambda (helper) function I wrote can be downloaded to the AFE from A version of Excel MAP helper function that will return an array of arrays (github.com).
By now, those that follow my work will be getting somewhat bored, whilst others might be plain mystified. Since writing the MAPλ function last week I have used it several times to provide solutions in which the thinking is already done and captured within the function. The sooner the in-built function behaves in the same manner the better (the 'nested arrays are not supported' message is getting very boring!)