+ Reply to Thread
Results 1 to 4 of 4

Excel 2007 : Separate Combined Numbers and Text

  1. #1
    Registered User
    Join Date
    01-06-2010
    Location
    San Diego CA
    MS-Off Ver
    Excel 2007
    Posts
    4

    Separate Combined Numbers and Text

    I am not the best at Excel formula's or macro's but really need some help with this issue. I have a spreadsheet where state abbreviations and postal codes have been combined with no spaces. They are located in cell "J". I need to figure out how to move the zip codes from cell J into K on their own so that only states are in cell J and only zip codes are in K. The number of characters isn't the same - some have 5 digit zip codes, some have 9 digit zip codes.

    Sample data:
    CA92123
    CA939212402

    Result needed
    J = CA
    K = 92123

    Any help would be greatly appreciated.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Seperate Combined Numbers and Text

    If the states are always, 2 chars...

    then in another column, say column L2.... =Left(J2,2)

    in in M2, =Substitute(J2,L2,"")

    both copied down

    Then you can copy these 2 columns, go to J1 and Edit|Paste Special >> Values over top...

    Then delete the remaining formula column.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887

    Re: Seperate Combined Numbers and Text

    Hi BW1, and welcome to the forum. If the format of the cells is always the two-digit state abbreviation followed by either a 5 or 9-digit zip code, then use the following formulas:

    State: =LEFT(J1,2)
    Zip: =TRIM(MID(J1,3,255))

    Hope that helps!

  4. #4
    Registered User
    Join Date
    01-06-2010
    Location
    San Diego CA
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Separate Combined Numbers and Text

    That worked!

    Thank you a bunch.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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