Array Transformation functions

INSBLNKRWS

Reference

» Reference, Discussion, & Example Applications:

About

Inserts blank Rows.

Calls ZINS.

Inputs:

  • a: array
  • [r] : row’s group size, if omitted r = 1
  • [g] : gap size, if omitted g = 1; if < 0 gap inserted also, but before 1st row

Code

M.S. Excel
INSBLNKRWS = LAMBDA(a, [r], [g],
    LET(
        x, MAX(1, r),
        y, IF(g, ABS(g), 1),
        q, ZINS(ROWS(a), x, y),
        s, IF(g < 0, VSTACK(SEQUENCE(y) ^ 0 - 1, q), q),
        b, INDEX(IF(a = "", "", a), s, SEQUENCE(, COLUMNS(a))),
        IF(s, b, "")
    )
);