lrobbo314
Well-known Member
- Joined
- Jul 14, 2008
- Messages
- 3,929
- Office Version
- 365
- Platform
- Windows
SPLITBYANY will split a text string by all the characters in the second argument.
The 'chars' argument is passed as an array separated by semicolons, e.g. {", " ; "; "}
The 'chars' argument is passed as an array separated by semicolons, e.g. {", " ; "; "}
Excel Formula:
=LAMBDA(text,chars,
TEXTSPLIT(
INDEX(
REDUCE(text,
SEQUENCE(ROWS(chars)),
LAMBDA(s,c,
SUBSTITUTE(s,INDEX(chars,c),"ƛ"))
)
,1
),,
"ƛ"
)
)
| SPLITBYANY | ||||
|---|---|---|---|---|
| A | B | |||
| 1 | Input | |||
| 2 | Bill Jelen, bill.jelen@mrexcel.com; Mike Girvin, mike.girvin@excelisfun.com | |||
| 3 | ||||
| 4 | Output | |||
| 5 | Name | |||
| 6 | Bill Jelen | bill.jelen@mrexcel.com | ||
| 7 | Mike Girvin | mike.girvin@excelisfun.com | ||
Sheet1 | ||||
| Cell Formulas | ||
|---|---|---|
| Range | Formula | |
| A6:B7 | A6 | =WRAPROWS(SPLITBYANY(A2,{", ";"; "}),2) |
| Dynamic array formulas. | ||
Upvote
0