Separate Address

lilgreen

New Member
Joined
May 10, 2019
Messages
15
I have been tasked with making this excel file to have the name, street address, the city, and state separated from col a. The problem is there are no good commas to delineate. How would this be best worked? Below Is a sample of what I have. I know it is a mess. I am thinking the only way is to manually copy and paste. I think there are around 500 to do.


NameAddress Line 1CityState
Beachhead Gatherings
918 Oakwood Dr Castle Rock CO
Colorado
Harvest Baptist Church
603 S Gilbert St Castle Rock CO
Colorado
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
you can add an auxiliary column C, which calculates the number of spaces-1 in the street&City-line. If the city is more then 1 word, you have to manually substract 1 or 2 of that number, try it, you'll see, so if you had there a "5" change it in a "4" or a "3"
The formulas in columns C:E, you copy them down along with your data.

If your done with adapting column C and satisfied with the result, you can select the whole range C:E, copy it and paste as values in the same place or somewhere else.
Then you filter or ... to get rid of the empty rows
Map1
ABCDEFG
1NameauxiiliarynameAddress Line 1CityState
24Beachhead Gatherings918 Oakwood Dr CastleRock Colorado
3Beachhead Gatherings     
4918 Oakwood Dr Castle Rock CO     
5Colorado     
65Harvest Baptist Church603 S Gilbert St CastleRock Colorado
7Harvest Baptist Church     
8603 S Gilbert St Castle Rock CO     
9Colorado     
Blad1
Cell Formulas
RangeFormula
C2:C9C2=IF($A2="",LEN(A4)-LEN(SUBSTITUTE(A4," ",""))-1,"")
D2:D9D2=IF($A2="",A3,"")
E2:E9E2=IF($A2="",TRIM(LEFT(SUBSTITUTE(A4," ",REPT(" ",100),C2),100)),"")
F2:F9F2=IF($A2="",MID(A4,LEN(E2)+2,LEN(A4)-LEN(E2)-3),"")
G2:G9G2=IF($A2="",A5,"")
 
Upvote 0
you can add an auxiliary column C, which calculates the number of spaces-1 in the street&City-line. If the city is more then 1 word, you have to manually substract 1 or 2 of that number, try it, you'll see, so if you had there a "5" change it in a "4" or a "3"
The formulas in columns C:E, you copy them down along with your data.

If your done with adapting column C and satisfied with the result, you can select the whole range C:E, copy it and paste as values in the same place or somewhere else.
Then you filter or ... to get rid of the empty rows
Map1
ABCDEFG
1NameauxiiliarynameAddress Line 1CityState
24Beachhead Gatherings918 Oakwood Dr CastleRock Colorado
3Beachhead Gatherings     
4918 Oakwood Dr Castle Rock CO     
5Colorado     
65Harvest Baptist Church603 S Gilbert St CastleRock Colorado
7Harvest Baptist Church     
8603 S Gilbert St Castle Rock CO     
9Colorado     
Blad1
Cell Formulas
RangeFormula
C2:C9C2=IF($A2="",LEN(A4)-LEN(SUBSTITUTE(A4," ",""))-1,"")
D2:D9D2=IF($A2="",A3,"")
E2:E9E2=IF($A2="",TRIM(LEFT(SUBSTITUTE(A4," ",REPT(" ",100),C2),100)),"")
F2:F9F2=IF($A2="",MID(A4,LEN(E2)+2,LEN(A4)-LEN(E2)-3),"")
G2:G9G2=IF($A2="",A5,"")
While I appreciate the answer I think it is going to be easier to copy/paste. I will still have to do a lot of manual work. I think you did great but I doubt there is a solution.
 
Upvote 0
500 addresses ... with a little luck 1-2 hours ???
the problem is that there is too much difference in the addresses, number of words, etc
 
Upvote 0

Forum statistics

Threads
1,215,247
Messages
6,123,857
Members
449,129
Latest member
krishnamadison

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top