Forum Discussion
Duffbeer
Jan 29, 2022Copper Contributor
WHOLE UC word split
 Wondered if anyone might assist or point me in the right direction.  I need to split text by (UPPERCASE WORDS & LOWERCASE WORDS not UC characters), for example:  From “16-04 CRICKET World Cup”. Too “...
- Jan 30, 2022
 
Detlef_Lewin
Jan 29, 2022Silver Contributor
Try this.
=LET(
a,FILTERXML("<y><z>"&SUBSTITUTE(SUBSTITUTE(A2,"-","#")," ","</z><z>")&"</z></y>","//z"),
SUBSTITUTE(TEXTJOIN(" ",TRUE,IF(EXACT(UPPER(a),a),a,"")),"#","-")
)
=TRIM(SUBSTITUTE(A2,B2,""))
- DuffbeerJan 29, 2022Copper ContributorHi, thank's for your swift response. I am getteing. INVALID NAME ERROR.
I have pasted this =LET(a,FILTERXML("<y><z>"&SUBSTITUTE(SUBSTITUTE(A2,"-","#")," ","</z><z>")&"</z></y>","//z"),SUBSTITUTE(TEXTJOIN(" ",TRUE,IF(EXACT(UPPER(a),a),a,"")),"#","-"))- Detlef_LewinJan 29, 2022Silver ContributorAre you referring to #NAME? error?
What version of Excel are you using?- DuffbeerJan 29, 2022Copper ContributorYes referring to #Name error. Can I not post a small dataset