Hello All
I've thousands of addresses in column A that need splitting because they are too long. Some addresses are 31 characters in length and others are up to 100 characters in length. There are no commas or semi-colons that split the addresses sadly. There are random amounts of spaces between each text string some may have the first space after 3 characters like a house number "103" and for some addresses, the first space might be after 13 characters i.e "apartment 103", it's all completely random.
So for example i may have two addresses
In A1 - '1600 Pennsylvania Avenue NW Washington DC 20500 USA' has 7 spaces in the 51-character text string
In A2 - '1 Buckingham palace London England' has 4 spaces in a 34-character text string
Is there a way to split a cell text string to the last space before 30 characters with a comma but not through a whole word? so in the above case there'd be a comma inserted after 'NW'
i've tried =LEFT(A1,FIND(" ",A1,FIND(" ",A1)+1)-1)&", "&RIGHT(A1,LEN(A1)-FIND(" ",A1,FIND(" ",A1)+1)) and =LEFT(A1,29)&","&RIGHT(A1,LEN(A1)-29)
Any and all suggestions are welcome, racking my brain on a Saturday evening trying to come up with a solution.
I've thousands of addresses in column A that need splitting because they are too long. Some addresses are 31 characters in length and others are up to 100 characters in length. There are no commas or semi-colons that split the addresses sadly. There are random amounts of spaces between each text string some may have the first space after 3 characters like a house number "103" and for some addresses, the first space might be after 13 characters i.e "apartment 103", it's all completely random.
So for example i may have two addresses
In A1 - '1600 Pennsylvania Avenue NW Washington DC 20500 USA' has 7 spaces in the 51-character text string
In A2 - '1 Buckingham palace London England' has 4 spaces in a 34-character text string
Is there a way to split a cell text string to the last space before 30 characters with a comma but not through a whole word? so in the above case there'd be a comma inserted after 'NW'
i've tried =LEFT(A1,FIND(" ",A1,FIND(" ",A1)+1)-1)&", "&RIGHT(A1,LEN(A1)-FIND(" ",A1,FIND(" ",A1)+1)) and =LEFT(A1,29)&","&RIGHT(A1,LEN(A1)-29)
Any and all suggestions are welcome, racking my brain on a Saturday evening trying to come up with a solution.