+ Reply to Thread
Results 1 to 4 of 4

Address and city splitting

  1. #1
    Forum Contributor
    Join Date
    07-17-2012
    Location
    bangalore
    MS-Off Ver
    Excel 2007
    Posts
    461

    Address and city splitting

    Hi All,

    I have the address associated with the city. Here I need to split the address and the city in tow different columns. And I also have the list of cities. Is there any formula to do so?

    Example:

    2001 Butterfield Rd Ste 1020Downers Grove
    2001 Butterfield Rd Ste 1020Downers Grove
    2001 Butterfield Rd Ste 1020Downers Grove
    3210 Watling StEast Chicago
    3210 Watling StEast Chicago
    1050 Macarthur CswyMiami
    1050 Macarthur CswyMiami
    1050 Macarthur CswyMiami


    Need to split like this


    2001 Butterfield Rd Ste 1020 Downers Grove
    2001 Butterfield Rd Ste 1020 Downers Grove
    2001 Butterfield Rd Ste 1020 Downers Grove
    3210 Watling StEast Chicago
    3210 Watling StEast Chicago
    1050 Macarthur Cswy Miami
    1050 Macarthur Cswy Miami
    1050 Macarthur Cswy Miami

  2. #2
    Registered User
    Join Date
    04-24-2014
    Location
    Willowbrook, USA
    MS-Off Ver
    Excel 2010
    Posts
    23

    Re: Address and city splitting

    I would count the characters(=LEN(refernce City cell)) from the list of the cities. and then use =right(reference cell, character length calculated before). Works only if the city is at the end.

  3. #3
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Address and city splitting

    This UDF seems to solve the problem.

    http://www.ozgrid.com/forum/showthread.php?t=82789
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  4. #4
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Address and city splitting

    Try this UDF (by jindon @ www.ozgrid.com)

    1. Copy code below
    2. Press Alt and F11 on your keyboard to open VB Editor
    3. Click on Insert and select Module
    4. Paste code into Module and close VB Editor.

    then use formula in B1:

    =TRIM(seren(A1))

    and copy it down


    Please Login or Register  to view this content.

    A
    B
    1
    2001 Butterfield Rd Ste 1020Downers Grove 2001 Butterfield Rd Ste 1020 Downers Grove
    2
    2001 Butterfield Rd Ste 1020Downers Grove 2001 Butterfield Rd Ste 1020 Downers Grove
    3
    2001 Butterfield Rd Ste 1020Downers Grove 2001 Butterfield Rd Ste 1020 Downers Grove
    4
    3210 Watling StEast Chicago 3210 Watling St East Chicago
    5
    3210 Watling StEast Chicago 3210 Watling St East Chicago
    6
    1050 Macarthur CswyMiami 1050 Macarthur Cswy Miami
    7
    1050 Macarthur CswyMiami 1050 Macarthur Cswy Miami
    8
    1050 Macarthur CswyMiami 1050 Macarthur Cswy Miami
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

+ 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. Replies: 4
    Last Post: 01-31-2014, 05:09 PM
  2. Converting a complete, single column address into separate columns for ADDRESS, CITY, ST,
    By jeffrogerssn in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-08-2012, 10:34 AM
  3. Replies: 2
    Last Post: 06-19-2012, 11:30 AM
  4. Replies: 2
    Last Post: 03-03-2005, 09:06 PM
  5. Splitting City State Zip
    By Pete Provencher in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-07-2005, 06:06 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