TEXTJOINARRAY

=TEXTJOINARRAY(array,delimiter,byColumn)

array
2D array to join text
delimiter
any delimiter to separate array values
byColumn
0 or blank to join each row in array, 1 to join each column in the array

TEXTJOINARRAY Joins the text in an array by row or column, with delimiter.

RicoS

Board Regular
Joined
May 1, 2019
Messages
62
TEXTJOINARRAY Joins the text in an array by row or column, with delimiter

Excel Formula:
=LAMBDA(array,delimiter,byColumn,
   LET(
      a,IF(byColumn,TRANSPOSE(array),array),
      d,delimiter,
      s,SEQUENCE(ROWS(a),1,0),
      tj,TEXTJOIN(d,TRUE,a),
      l,LEN(d),seqL,(s*0)+(l*COLUMNS(a)),
      end,SUMCUMULATIVE(SUMROWS(LEN(a)+l)),
      start,IF(s=0,1,1+INDEX(seqL,s,1)+INDEX(end,s,1)),
      md,MID(tj,start,end-start+1),
      return,IF(byColumn,TRANSPOSE(md),md),
   return)
)

Lambda - Last Cell and Split.xlsx
BCDEFGHIJKLMNO
1Original Array
2test thistest this
3this testthis test
4further testfurther test
5
6
7Text join
8test this
9this test
10further test
Sheet1
Cell Formulas
RangeFormula
C2:N4C2=TEXTTOARRAY(B2:B4)
B8:B10B8=TEXTJOINARRAY(C2#,"",)
Dynamic array formulas.
 
Upvote 0
Note: Refer to the TEXTTOARRAY function used in the sample above.

@RicoS - you can include links to the extra Lambda functions used in a sample to make it easier to find them. Thanks!
 

Forum statistics

Threads
1,223,575
Messages
6,173,148
Members
452,502
Latest member
PQCurious

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top