Forum Discussion
data_junky
Feb 21, 2025Copper Contributor
Using Scan function with Oddly shaped arrays
I have two arrays of different shares. One array is a set of values. The other is a set of growth rates. The challenge is to apply the scan function to get the an array of values that are increased...
djclements
Feb 22, 2025Silver Contributor
Another possibility, using NA() as the reset point for each new row, then DROP to remove the helper column(s):
=DROP(SCAN(,HSTACK(IF({1,0},NA(),array1),1+array2),LAMBDA(a,v,IFNA(a,1)*v)),,2)*ISNUMBER(array2)See attached...