I've been posting a lot of Array/Spill Range answers lately trying to generate non-vba/App Script solutions. However, I've run into situations where I have arrays within arrays that aren't spilling as I expect. This specific question caused me to post this question.
Synopsis of issue I was addressing:
- Starting values of 5 columns of data in
A:E
. - OP wants unique list of first four columns (
A:D
) - Transpose
Column E
values to the right.
Sample Starting Data:
Col A | B | C | D | E |
---|---|---|---|---|
Alpha | Bravo | Charlie | Delta | 1 |
Alpha | Bravo | Charlie | Delta | 2 |
Alpha | Bravo | Charlie | Delta | 3 |
Delta | Echo | Foxtrot | Gulf | 4 |
Delta | Echo | Foxtrot | Gulf | 5 |
Delta | Echo | Foxtrot | Gulf | 6 |
XRay | Yankee | Zulu | Delta | 9 |
XRay | Yankee | Zulu | Delta | 4 |
XRay | Yankee | Zulu | Delta | 2 |
XRay | Yankee | Zulu | Delta | 1 |
XRay | Yankee | Zulu | Delta | 3 |
Alpha | Bravo | Charlie | Delta | 4 |
Desired Outcome:
i | J | K | L | M | N | O | P | Q |
---|---|---|---|---|---|---|---|---|
Alpha | Bravo | Charlie | Delta | 1 | 2 | 3 | 4 | |
Delta | Echo | Foxtrot | Gulf | 4 | 5 | 6 | ||
XRay | Yankee | Zulu | Delta | 9 | 4 | 2 | 1 | 3 |
My solution spreadsheet is posted here or see google sheets version that you can edit in duplicate tabs.
I can easily get the first four columns using the below formula in cell i1
=UNIQUE(FILTER(A:D,NOT(ISBLANK((A:A)))))
I can then use the function below to create the transposed values to spill out to the right (as shown above) in M1
.
=TRANSPOSE(FILTER(E:E,(NOT(ISBLANK(E:E))*(A:A&B:B&C:C&D:D=I1&J1&K1&L1))))
My challenge is getting this above formula to spill down to match the first four columns. Obviously, I can drag the formula down (which was my proposal), but how can I make this formula dynamic that spills down similar to the first four columns? The below formula seemed to me like it should work, but it throws an error:
=FILTER(TRANSPOSE(FILTER($E:$E,(NOT(ISBLANK($E:$E))*($A:$A&$B:$B&$C:$C&$D:$D=I1:I999&J1:J999&K1:K999&L1:L999)))),NOT(ISBLANK(L1:L999)))
Bonus/Similar question: I experienced a similar problem in this answer. If you can figure how how to make column E
in this spreadsheet a dynamic spill range, I'll upvote the answer.