I often VSTACK columns and remove empty results with FILTER like so:
FILTER(VSTACK(<filtered_column_1>;<filtered_column_2>);
VSTACK(<filtered_column_1>;<filtered_column_2>)<>0)
But I’ve come accross a case in which I actually want to keep blanks that are not consecutive, initial or final.
Unfiltered VSTACK output:
<blank>
1
2
<blank>
<blank>
<blank>
2
2
3
<blank>
Desired filtered VSTACK output:
1
2
<blank>
2
2
3
The leading blank I can remove with another filter, and the trailing blank is not too much of an issue, but I don’t know how to deal with the consecutive blanks in the middle (wanting to leave just one).
It should technically be easy comparing each value to the previous one, but my problem is that I don’t know how to reference the VSTACK output columns for comparison in the FILTER “include” argument, specially considering the columns I’m feeding as arguments to the VSTACK are not referenceable columns but rather filtered columns themselves.
FILTER(VSTACK(<filtered_column_1>;<filtered_column_2>);
<what do I do here in the "include" argument?>)
Any ideas?