+ Reply to Thread
Results 1 to 2 of 2

help seperating city and state. Text to column creates 3 columns

  1. #1
    Registered User
    Join Date
    01-08-2004
    Posts
    12

    help seperating city and state. Text to column creates 3 columns

    I am going to be importing a database each week containg addresses. Ia m hoping someone can help me determine the best method of seperating a problem column. Currently the file comes in .csv format. My problem is that the source file considers city and state a single item or column. I need to break these up into 2 seperate columns for my purposes. I initially though this could be fixed with text to columns. However when the city has a name like "SAN BERNARDINO CA" it creates three columns then cities like "REDLANDS CA" it creates two. This would require me to resort and remerge the city names back together. Thus creating alot more work. Do you have any suggestions on how I can automate this or use an advanced method similar to the text to columns tool? The souce comes in looking like this

    l REDLANDS CA l
    l SAN BERNARDINO CA l

    I need

    l REDLANDS l CA l
    l SAN BERNARDINO l CA l

  2. #2
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    You can use a couple formulas to complete this.

    For city:

    =LEFT(A1,LEN(A1)-3)

    For state:

    =RIGHT(A1,2)

    Copy down, then highlight all of these, select copy, then past special > values.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1