Array Transformation functions

COLSRPT_N_TIMES

Reference

» N/A

About

Repeats each Column ‘N’ times.

Inputs:

  • array : array to repeat
  • n_times_count : number of times to repeat each column in the array

Code

M.S. Excel
COLSRPT_N_TIMES = LAMBDA(array, n_times_count,
  LET(
      a, array,
      n, n_times_count,
      INDEX(
          a,
          TOCOL(SEQUENCE(, ROWS(a))),
          TOROW(IF(n >= SEQUENCE(n), SEQUENCE(, COLUMNS(a)), NA()), 0, TRUE)
      )
  )
);