Xlambda
Well-known Member
- Joined
- Mar 8, 2021
- Messages
- 860
- Office Version
- 365
- Platform
- Windows
ATEXTJOIN !! recursive !! appends horizontally each row of an array, adds leading string or not, we can set start index, with delimiter or not.
Excel Formula:
=LAMBDA(ar,a,s,d,
LET(c,COLUMNS(ar),
i,MIN(c+1,MAX(1,s)),
ai,INDEX(ar,,i),
IF(i=c+1,a,ATEXTJOIN(ar,a&IF(ai="","",ai&IF(i=c,"",d)),i+1,d))
)
)
LAMBDA 5.0.xlsx | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | |||
1 | prod a | gd23 | 120 | red | 10 | Steve | no leading string,start 0,no delim | ||||
2 | prod b | rf45 | 430 | green | 15 | John | prod agd23120red10Steve | ||||
3 | prod c | et7 | 100 | white | 45 | David | prod brf45430green15John | ||||
4 | prod cet7100white45David | ||||||||||
5 | |||||||||||
6 | no leading string,start 0,dble delim | ||||||||||
7 | prod a//gd23//120//red//10//Steve | ||||||||||
8 | prod b//rf45//430//green//15//John | ||||||||||
9 | prod c//et7//100//white//45//David | ||||||||||
10 | |||||||||||
11 | leading string,start index 3,delim | ||||||||||
12 | tbl 1 - 120|red|10|Steve | ||||||||||
13 | tbl 1 - 430|green|15|John | ||||||||||
14 | tbl 1 - 100|white|45|David | ||||||||||
15 | |||||||||||
16 | leading string as array | ||||||||||
17 | 1-prod a/gd23/120/red/10/Steve | ||||||||||
18 | 2-prod b/rf45/430/green/15/John | ||||||||||
19 | 3-prod c/et7/100/white/45/David | ||||||||||
20 | |||||||||||
21 | leading string with formula | ||||||||||
22 | tbl 11 -prod a/gd23/120/red/10/Steve | ||||||||||
23 | tbl 12 -prod b/rf45/430/green/15/John | ||||||||||
24 | tbl 13 -prod c/et7/100/white/45/David | ||||||||||
25 | |||||||||||
ATEXTJOIN post |
Cell Formulas | ||
---|---|---|
Range | Formula | |
H2:H4 | H2 | =ATEXTJOIN(A1:F3,,,) |
H7:H9 | H7 | =ATEXTJOIN(A1:F3,,,"//") |
H12:H14 | H12 | =ATEXTJOIN(A1:F3,"tbl 1 - ",3,"|") |
H17:H19 | H17 | =ATEXTJOIN(A1:F3,{"1-";"2-";"3-"},,"/") |
H22:H24 | H22 | =LET(a,A1:F3,d,"-",ai,"tbl 1"&SEQUENCE(ROWS(a))&" -",ATEXTJOIN(a,ai,,"/")) |
Dynamic array formulas. |
Last edited by a moderator:
Upvote
0