Text to Column

noob

Board Regular
Joined
Mar 5, 2008
Messages
59
A1 contains a full address but they are not constant where i can use text to column by spaces. Is there another way to do this in excel2010. I'm looking to get STREET# IN COLUMN A, DIRECTION STREET AND SUFFIX IN B, CITY IN C, STATE IN D AND ZIP IN COLUMN E

examples


51 W MAPLE CT DECATUR ILLINOIS 62526
2255 SANDS DR DECATUR ILLINOIS 62526
60 GLENVIEW DR DECATUR ILLINOIS 62521
7 W HIGDON DR DECATUR ILLINOIS 62521
45 W REEDER DR DECATUR ILLINOIS 62521
3487 NANCY RD DECATUR ILLINOIS 62521
1715 W DANCE LAND RD DECATUR ILLINOIS 62521
132 POINT BLUFF DR DECATUR ILLINOIS 62521
2699 W HARRY LAND RD DECATUR ILLINOIS 62521
2644 FORREST GREEN DR DECATUR ILLINOIS 62521
 
Last edited:

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Hi

Try this -
Excel Workbook
ABCDEFM
151W MAPLE CTDECATURILLINOIS6252651 W MAPLE CT DECATUR ILLINOIS 62526
22255SANDS DRDECATURILLINOIS625262255 SANDS DR DECATUR ILLINOIS 62526
360GLENVIEW DRDECATURILLINOIS6252160 GLENVIEW DR DECATUR ILLINOIS 62521
47W HIGDON DRDECATURILLINOIS625217 W HIGDON DR DECATUR ILLINOIS 62521
545W REEDER DRDECATURILLINOIS6252145 W REEDER DR DECATUR ILLINOIS 62521
63487NANCY RDDECATURILLINOIS625213487 NANCY RD DECATUR ILLINOIS 62521
71715W DANCE LAND RDDECATURILLINOIS625211715 W DANCE LAND RD DECATUR ILLINOIS 62521
8132POINT BLUFF DRDECATURILLINOIS62521132 POINT BLUFF DR DECATUR ILLINOIS 62521
92699W HARRY LAND RDDECATURILLINOIS625212699 W HARRY LAND RD DECATUR ILLINOIS 62521
102644FORREST GREEN DRDECATURILLINOIS625212644 FORREST GREEN DR DECATUR ILLINOIS 62521
Sheet18
Excel 2007
Cell Formulas
RangeFormula
A1=LEFT($M1,FIND(" ",$M1)-1)
B1=MID($M1,FIND(" ",$M1)+1,FIND("@",SUBSTITUTE($M1," ","@",LEN($M1)-LEN(SUBSTITUTE($M1," ",""))-2))-FIND(" ",$M1))
C1=TRIM(MID(SUBSTITUTE(SUBSTITUTE($M1," ",REPT(" ",19),LEN($M1)-LEN(SUBSTITUTE($M1," ",""))-1)," ",REPT(" ",19),LEN($M1)-LEN(SUBSTITUTE($M1," ",""))-2),25,25))
D1=TRIM(MID(SUBSTITUTE(SUBSTITUTE($M1," ",REPT(" ",19),LEN($M1)-LEN(SUBSTITUTE($M1," ","")))," ",REPT(" ",19),LEN($M1)-LEN(SUBSTITUTE($M1," ",""))-1),38,25))
E1=RIGHT($M1,5)

I have moved your source addresses across to Column M because otherwise you destroy your source data.

Also, the solution will NOT cope with a city which has a space eg Des Moines.

hth
 
Upvote 0
Also, the solution will NOT cope with a city which has a space eg Des Moines.
.. or a State with a space eg South Dakota

noob, this type of question is notoriously difficult because of the great variety of address forms that can exist.
 
Upvote 0
.. or a State with a space eg South Dakota

Thanks Peter, should have got that too.

Had a similar problem a few weeks ago and suggested to the then OP that the exceptions were probably few and far between and could be spotted visually and then amended accordingly.
 
Upvote 0
Thank you very much gentleman did it semi mannualy last night using text to column, filter, and replace. It will be good to have it for the next time. I did test it and it took alot less time :rofl:
 
Upvote 0
One way to fix the citys and states with spaces would be to replace them i.e St Paul replaced with StPaul..... I think :confused: :)
 
Last edited:
Upvote 0
One way to fix the citys and states with spaces would be ro replace them i.e St Paul replaced to StPaul..... I think :confused: :)
To do that, wouldn't you need a complete list of two-worded cities (and states)?

Even then you may still need to be careful as you may have an address like
153 St Paul Dr Maryville ..
That is, the St Paul in this case is not the city name.

Then you also have cities with more than two words (eg Boca del Mar, FL)

As Mike mentioned earlier, formulas will be some help to get the bulk of it done, but you really need a human eye to check over the results and probably tweak some of them manually.
 
Upvote 0

Forum statistics

Threads
1,224,617
Messages
6,179,915
Members
452,949
Latest member
beartooth91

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