Forum Moderators: open
What I have is this example...
word1 word2 word3
In one colum I need the space, but in another I need the space to be replaced by a +
The spreadsheet is a template so the words change requently. Some have 3 spaces some have just 1 and some have none. I can figure out how to do 1 but if there are more than one I cant. I did a FIND and then just deleted the space. If it has none, then it gives an error.
thx in advance!
I do this on a large scale multiple times a day and wondering if there was a way to ease the work load.
Let's say you have the word "Las Vegas" in cell A1
Does this do what you want it to do:
=CONCATENATE(LEFT(A1,FIND(" ",A1)-1),"+",MID(A1,FIND(" ",A1)+1,10))
If you copy the formula correctly, it will return Las+Vegas. Just make sure the "10" is long enough in the MID function.
=IF(ISERR(FIND(" ",A1))=TRUE,A1,IF(ISERR(FIND(" ",A1,FIND(" ",A1)+1))=TRUE,CONCATENATE(LEFT(A1,FIND(" ",A1)-1),"+",MID(A1,FIND(" ",A1)+1,20)),CONCATENATE(LEFT(A1,FIND(" ",A1)-1),"+",MID(A1,FIND(" ",A1)+1,FIND(" ",A1,FIND(" ",A1))+1),"+",MID(A1,FIND(" ",A1,FIND(" ",A1)+1)+1,20))))
Worked for me.