Array Transformation functions

MULTIPLY_EVERY_1_CELL

Reference

» N/A

About

Multiplies every 1 cell, cumulatively, and horizontally, from an array of cells.

Inputs:

  • horizontal_vector : horizontal vector with values to multiply

Code

M.S. Excel
MULTIPLY_EVERY_1_CELL = LAMBDA(horizontal_vector,
  LET(
      arr, horizontal_vector,
      idx, SEQUENCE(, COLUMNS(arr), 1, 1),
      select, MOD(idx - 1, 1) + 1,
      scan1, IF(select = 1, SCAN(1, IF(select = 1, INDEX(arr, , idx), 1), LAMBDA(a, r, a * r)), 0),
      scan1
  )
);