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
 
Duffbeer
Jan 29, 2022Copper Contributor
Hi, 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,"")),"#","-"))
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_Lewin
Jan 29, 2022Silver Contributor
Are you referring to #NAME? error?
What version of Excel are you using?
What version of Excel are you using?
- DuffbeerJan 29, 2022Copper ContributorYes referring to #Name error. Can I not post a small dataset
- Detlef_LewinJan 29, 2022Silver Contributor
You are using an old version of Excel.
Replace the formula with this slightly longer one:
=SUBSTITUTE(TEXTJOIN(" ",TRUE,IF(EXACT(UPPER( FILTERXML("<y><z>"&SUBSTITUTE(SUBSTITUTE(A2,"-","#")," ","</z><z>")&"</z></y>","//z")), FILTERXML("<y><z>"&SUBSTITUTE(SUBSTITUTE(A2,"-","#")," ","</z><z>")&"</z></y>","//z")), FILTERXML("<y><z>"&SUBSTITUTE(SUBSTITUTE(A2,"-","#")," ","</z><z>")&"</z></y>","//z"),"")),"#","-")- DuffbeerJan 29, 2022Copper ContributorSorry Detlef in my haste I did not read your second question. Using excel 2016. Pasted the above into cell B1 as data starts in cell A1. Same error message. After pasting do I need to change any referencing. Garry