ARRINS
ARRINS (Arrays Insert)
Section titled “ARRINS (Arrays Insert)”Reference
Section titled “Reference”>> Reference, Discussion, & Example Applications:
“Intercalates” rows or columns of 2 arrays.
Calls ABLNKINS.
Inputs:
Section titled “Inputs:”- ar : array to receive the insert
- br : array to be inserted
- [rc] : rows/columns orientation: if omitted or 0, by rows; if 1 by columns
- [h] : headers array
More Info
Section titled “More Info”NOTE: Arrays should be proportionate by nr. of elements and to share one dimension.
ARRINS = LAMBDA(ar, br, [rc], [h], LET( a, IF(ar = "", "", ar), b, IF(br = "", "", br), o, IF(rc, -1, 1), k, o * COUNTA(a) / COUNTA(b), x, ABLNKINS(a, k), v, IFNA(IF(rc, HSTACK(x, ""), VSTACK(x, "")), ""), y, ABLNKINS(b, o * 1, -ABS(k)), z, IF(v = "", y, v), IF(AND(h = ""), z, IF(rc, HSTACK(h, z), VSTACK(h, z))) ));