+ Reply to Thread
Results 1 to 8 of 8

Separate city state and zip

  1. #1
    Registered User
    Join Date
    02-24-2004
    Location
    San Diego California
    Posts
    22

    Separate city state and zip

    This is in one column. I would like to be able to separate the city state and zip to their own columns. Below is an example of what comes into one column

    example
    4768 LOGAN AVE A | SAN DIEGO 921133759

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Separate city state and zip

    you could use text to column.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Separate city state and zip

    You will need to provide a few more samples of what you have and what you want.
    In many cases, this a really hard to do, because a street name can have 1 or more words, as can the state - how would you determine if the 2nd (or 3rd) word was part of the street or state name?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Forum Contributor Obsessed's Avatar
    Join Date
    05-22-2013
    Location
    Cincinnati, Ohio
    MS-Off Ver
    Excel 365
    Posts
    215

    Re: Separate city state and zip

    OP, your example doesn't even have a state listed. Like FDibbins said, we'll need a better example (workbook preferable) that shows exactly what you are dealing with, as there are multiple methods and knowing which is best requires looking at the exact situation you are facing.
    Want to show appreciation for the help you received from a member? Give them reps by clicking the bottom left of their post!

  5. #5
    Registered User
    Join Date
    02-24-2004
    Location
    San Diego California
    Posts
    22

    Re: Separate city state and zip

    The first row has an example of what I would like to accomplish
    Attached Files Attached Files

  6. #6
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Separate city state and zip

    Enter in B1 and fill down
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Enter in D1 and fill down
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Enter in C1 and fill down
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  7. #7
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,937

    Re: Separate city state and zip

    address: =LEFT(A2,FIND("|",A2)-2)
    city: =MID(A2,FIND("|",A2)+2,LEN(A2)-(FIND("|",A2)+2)-9)
    zip: =RIGHT(A2,9)
    Ben Van Johnson

  8. #8
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 V 2503
    Posts
    13,702

    Re: Separate city state and zip

    Another way if you can tolerate small mega-formula. In B2 filled across to column D and filled down.

    =IFERROR(TRIM(MID(SUBSTITUTE(REPLACE($A2,LOOKUP(25^25,FIND(" ",$A2,ROW($1:$50))),1,REPT(" ",99))," | ",REPT(" ",99)),(COLUMNS($A:A)-1)*99+1,99)),"")
    Dave

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Look Up a Corresponding State to Match a City
    By califorlina in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-23-2015, 10:17 AM
  2. Separate Zip Code from City, State Zip Code
    By caunyd in forum Excel General
    Replies: 3
    Last Post: 08-04-2013, 05:14 PM
  3. Replies: 0
    Last Post: 08-14-2012, 04:47 PM
  4. Replies: 2
    Last Post: 06-19-2012, 11:30 AM
  5. Replies: 2
    Last Post: 02-02-2012, 12:47 AM
  6. I wish to separate city, state, and zip into 3 separate columns
    By Bob Woolbert in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-11-2006, 01:45 PM
  7. how do I separate 1 excel column to read city, state, zip columns
    By usndiv in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-26-2006, 05:40 PM

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