Reputation: 2108
I have Google Sheet document and I use TEXTJOIN in it. I want to have my TEXTJOIN formula filled when i add new rows. But it doesn't work
So I tried to use ARRAYFORMULA. IT works with numbers:
But it still doesn't work with TEXTJOIN:
Any Ideas?
UPD: If I use &
instead of TEXTJOIN
it works but in fact i shoud use delimiter and I should avoid double delimiter. I shouldn't have any a--a
or d-D-
:
Upvotes: 12
Views: 15762
Reputation: 11
=MAP(B2:B8,LAMBDA(array,TEXTJOIN(" ",TRUE,INDEX(B2:F8,ROW(array)-1,))))
=MAP( rangeOfHowManyRows, LAMBDA( aName, TEXTJOIN(delimiter, TRUE, INDEX( fullRange, ROW(aName)-1, ) ) ) )
The use of INDEX
makes spanning many columns much less painful.
Upvotes: 1
Reputation: 71
Sheets now has a MAP function that you can use instead of ARRAYFORMULA.
You use a formula like this in column C:
=MAP(A1:A,B1:B,LAMBDA(a,b,TEXTJOIN(" ",TRUE,{a,b}))
The lambda will be called for each row, with the value of column A and column B for the row passed as the first two params of the lambda function.
Upvotes: 7
Reputation: 4557
Giving multiple array ranges to Arrayformula, and trying to force it to evaluate it in a specific order, is a losing battle. Try something simpler instead:
=arrayformula(A1:A & " " & B1:B)
P.S. Your animated illustrations do show a level of effort on your part to ask a nice question, but frankly my eyes hurt from watching 3 cursors simultaneously, I'd prefer just the formulas or static images.
Upvotes: 3