Another, hopefully quick, Dynamic Array question
With a 2D array I wanted to replace any blank values on a row with the previous value. I found this which sort of worked. =SCAN(0, N72:AJ74, LAMBDA(a,v, IF(v=””,a,v)))
However, the accumulator value is carried forward to the next row so if there is a value at the end of the previous row, it is carried forward to the next row as SCAN just works its way through the array. I want to treat each row independently so that there is nothing carried forward to the next row.
I tried with ByRow but this caused a calc error. Couldn’t find a way to ‘get’ the row number or to determine the row had changed and thus be able to set a to 0. Or, to get ByRow to work which would have been the easiest.
This could apply to the MAP function too as getting the row and column index could help determine a new column or row
With a 2D array I wanted to replace any blank values on a row with the previous value. I found this which sort of worked. =SCAN(0, N72:AJ74, LAMBDA(a,v, IF(v=””,a,v)))However, the accumulator value is carried forward to the next row so if there is a value at the end of the previous row, it is carried forward to the next row as SCAN just works its way through the array. I want to treat each row independently so that there is nothing carried forward to the next row.I tried with ByRow but this caused a calc error. Couldn’t find a way to ‘get’ the row number or to determine the row had changed and thus be able to set a to 0. Or, to get ByRow to work which would have been the easiest. This could apply to the MAP function too as getting the row and column index could help determine a new column or row Read More