Skip to content

ARRWS

>> Reference, Discussion, & Example Applications:

Re-arranges rows of an array from left to right in any order.

  • ar : array
  • ns : new sequence order rows (whatever index nr. are left out will be appended at the bottom of the array)
ARRWS = LAMBDA(ar, ns,
LET(
a, IF(ar = "", "", ar),
s, SEQUENCE(ROWS(a)),
h, CHOOSEROWS(s, ns),
x, XMATCH(s, h),
f, FILTER(s, ISNA(x)),
INDEX(a, VSTACK(h, f), SEQUENCE(, COLUMNS(a)))
)
);