Forum Discussion
James_Buist
Aug 17, 2024Brass Contributor
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...
- Aug 17, 2024
=DROP(REDUCE("",SEQUENCE(ROWS(N72:AJ74)),LAMBDA(x,y,VSTACK(x,SCAN(0, CHOOSEROWS(N72:AJ74,y), LAMBDA(a,v, IF(v="",a,v)))))),1)
Does this formula return the intended result?
OliverScheurich
Aug 17, 2024Gold Contributor
=DROP(REDUCE("",SEQUENCE(ROWS(N72:AJ74)),LAMBDA(x,y,VSTACK(x,SCAN(0, CHOOSEROWS(N72:AJ74,y), LAMBDA(a,v, IF(v="",a,v)))))),1)
Does this formula return the intended result?
James_Buist
Aug 17, 2024Brass Contributor
It absolutely does. Wow. Brilliant. That concept will help elsewhere as well. Many thanks