简体   繁体   中英

Excel take apart address cities with districts correctly?

How to take apart addresses in Excel?

I have addresses like:

  • Zipcode always 4 digits
  • But in cities like Budapest and London, there is a district number like XV. and V.
  • I know the city names witch contains district numbers.
5555 London XV. Apple Street 77.
6666 Budapest V. Banana Street 6.
7777 Southampton Big street 5.
8888 Southampton Small street 6.

Text To Columns Excel

Unfortunately, this format like that when I use space as delimiter:

5555 |London      |XV.  |Apple Street |77.
6666 |Budapest    |V.   |Banana Street |6.
7777 |Southampton |Big  |street |5.
8888 |Southampton |Small| street |6.

If I use space and dot as a delimiter still not works good.

I want this structure:

5555 |London      XV.  |Apple Street |77.
6666 |Budapest    V.   |Banana Street |6.
7777 |Southampton      |Big  |street |5.
8888 |Southampton      |Small| street |6.

Which functions shall I use?

I can imagine this is not what you are looking for, but when I needed to deal with such situations in the past, I did the following:

Replace "London XV" by "London_XV"   (using an underscore or a hyphen)
Replace "Budapest V" by "Budapest_V" (same thing)
...
(You can easily do this in a simple text editor, like Notepad, Notepad++, ...)

Then you do the Text To Columns (or you do this while importing the textfile).

Afterwards, you replace "London_XV" back by "London XV" and "Budapest_V" by "Budapest V", ...

Good luck

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM