+ Reply to Thread
Results 1 to 5 of 5

Split unformatted addresses into separate columns

  1. #1
    Registered User
    Join Date
    08-13-2015
    Location
    Chennai, India
    MS-Off Ver
    2013
    Posts
    5

    Question Split unformatted addresses into separate columns

    Hello Excel experts,

    This is my first post here.

    I need your help in solving an issue with separating out addresses into address, city, state and pin code.

    This is how my data looks now.

    503, LEVEL 5 , BLOCK A KELANA CENTRE POINT 3, JALAN SS 7/19, KELANA JAYA 47301 SELANGOR
    1 ,JALAN PHASE INTAN, PHARSE NU3A1 NILAI UTAMA ENTERPRISE PARK NILAI 71800 NEGERI SEMBILAN
    H-8-3 BAY AVENUE LORONG BAYAN INDAH 2 BAYAN LEPAS 11900 PULAU PINANG
    2062 TAMAN DESA JAYA 2 CHENDERING 21080 TERENGGANU
    5 USJ 6 JALAN USJ6/2J TAIPAN SUBANG JAYA 47610 SELANGOR


    These are Malaysian addresses. The text after the pin code is the state and the text before it is the city.

    I need to figure out a way to do so for 2000+ addressess. I tried using "RIGHT" and "FIND" functions and "Text to Columns" functions. All attempts were unsuccessful.

    I would be very thankful if you could help me out here.

    Thanks,
    Palaniappan

  2. #2
    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
    52,933

    Re: Split unformatted addresses into separate columns

    Hi, welcome to the forum

    Where is this info coming from? maybe there is a better way to import it?

    Looking at those examples (assuming each 1 is in it's own row), I think excel would have a hard time trying to ID the different parts, there seems to be no standard format

    some have a number and a comma, others dont
    Just looking at those, I would have no clue where to break them apart, and if a person cannot "see" where the breaks are, then you cannot even begin to code excel to look for those breaks
    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

  3. #3
    Registered User
    Join Date
    08-13-2015
    Location
    Chennai, India
    MS-Off Ver
    2013
    Posts
    5

    Re: Split unformatted addresses into separate columns

    Hello FDibbins,

    Thanks for your quick reply.

    You are right. There is no standard format at this atvall. I might have to try importing data in a different format.

    If there is a way to separate out the 5-digit code and state, which follow the same format at the end, it would solve a good amount of my problem.

    Thanks again.

    Palaniappan

  4. #4
    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
    52,933

    Re: Split unformatted addresses into separate columns

    If there is a way to separate out the 5-digit code and state, which follow the same format at the end, it would solve a good amount of my problem.
    I can see problems with that too you have a number and then either 1 or 2 (maybe 3) words following it. So you cant even start looking from the 2nd-last space

    hmm ok lets see how much this will help you.

    Assuming your data is in A1 down, put this in B1 and copy down...
    =MID(A1,SEARCH("@",SUBSTITUTE(A1," ","@",LEN(A1)-LEN(SUBSTITUTE(A1," ",""))-2)),99)

    Then put this in C1 and copy down...
    =LOOKUP(99^99,--("0"&MID(B1,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},B1&"0123456789")),ROW($1:$10000))))
    (Courtesy of:*Ron Coderre)

  5. #5
    Registered User
    Join Date
    08-13-2015
    Location
    Chennai, India
    MS-Off Ver
    2013
    Posts
    5

    Re: Split unformatted addresses into separate columns

    Thank you FDibbins.

    This was a great step forward.

    I was able to spread out most of the pincodes and I guess I can find states and cities with that using a database of pincodes, states and cities using vlookup or index match.

    Thanks a ton!!

+ 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. Extract matching first name from unformatted email addresses
    By gmcelroy in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 04-08-2015, 03:26 AM
  2. [SOLVED] How do I split the date & time into two separate columns?
    By bananajelly in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 09-22-2014, 03:26 PM
  3. Replies: 4
    Last Post: 06-22-2014, 06:25 PM
  4. Replies: 11
    Last Post: 09-26-2012, 01:20 PM
  5. Replies: 1
    Last Post: 07-03-2012, 05:49 PM
  6. Replies: 2
    Last Post: 06-19-2012, 11:30 AM
  7. Split date into 3 separate columns
    By paulr24 in forum Excel General
    Replies: 4
    Last Post: 01-25-2012, 01:51 PM

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