+ Reply to Thread
Results 1 to 4 of 4

left, right, find, mid

  1. #1
    Registered User
    Join Date
    12-07-2012
    Location
    Houston, TX, USA
    MS-Off Ver
    Excel 2016
    Posts
    58

    left, right, find, mid

    I have an address list that has all info in one column -
    1234 Spring St New Pottstown AZ 80752
    5478 Gallant Forest Ave Apt 432 Media PA 19237

    I can't use find (" ") because some of the street names are 1 name, some are 2.
    Some of the cities are 2 words, some are 1.
    The formatting is not consistent.
    There are no delimiters.

    How can I get the street address info separated out by 4 columns -- street address, city, state, zip ?

    Thank you.

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,178

    Re: left, right, find, mid

    As you state there are no delimiters so it will nearly impossible to decide where/how the addresses should be broken into street /city etc

    Streets may be "delimited" by terms such as "St","Ave","Road": State should be doable.

    Can you post a small file with a good cross-section of addresses?



    Please attach a file (not image) so that respondents (a) do not have to type in data and (b) have data with which test any formulas. Ensure the data is representative of your actual "real world" data.

    Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate.

    Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the (remove confidential) data.

    To Attach a File:

    1. Scroll down to the window below your post Additional Options
    2. In the frame Attach Files you will see the button Manage Attachments
    3. Click the button.
    4. A new window will open titled Manage Attachments - Excel Forum.
    5. Click the Browse... button to locate your file for uploading.
    6. This will open a new window File Upload.
    7. Once you have located the file to upload click the Open button. This window will close.
    8. You are now back in the Manage Attachments - Excel Forum window.
    9. Click the Upload button and wait until the file has uploaded.
    10. Close the window and then click Submit.

  3. #3
    Valued Forum Contributor ImranBhatti's Avatar
    Join Date
    03-27-2014
    Location
    Rawalpindi,Pakistan
    MS-Off Ver
    Office 365
    Posts
    1,784

    Re: left, right, find, mid

    Hi filly

    Any chance you could upload a sample workbook with desired results manually put?

    Post a WORKBOOK.Scroll down to the Manage Attachments button), browse to the required file, and then push the Upload button.
    Best Regards
    Imran Bhatti
    Teach me Excel VBA

  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,929

    Re: left, right, find, mid

    Those are always messy and seldom reach a good resolution

    123 commons new york
    could be...
    123 commons new, york
    123 commons, new york

    Perhaps this will get you headed in teh right direction, it splits out everything based on a space,,,
    A
    B
    C
    D
    E
    F
    G
    H
    I
    1
    1234 Spring St New Pottstown AZ 80752 1234 Spring St New Pottstown AZ 80752
    2
    5478 Gallant Forest Ave Apt 432 Media PA 19237 5478 Gallant Forest Ave Apt 432 Media PA

    B1=TRIM(MID(SUBSTITUTE($A1," ",REPT(" ",LEN($A1))),LEN($A1)*(COLUMNS($A$1:A1)-1)+1,LEN($A1)))
    copied down and across
    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

+ 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. LEFT, RIGHT and FIND
    By msixdatateam in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-23-2014, 11:59 AM
  2. [SOLVED] Left/right find
    By jwillis07 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-09-2014, 04:29 AM
  3. [SOLVED] Left with find?
    By namluke in forum Excel General
    Replies: 7
    Last Post: 06-14-2014, 02:51 PM
  4. [SOLVED] Left with Find vba
    By redmarko in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-22-2013, 05:01 PM
  5. IF FIND LEFT help
    By ScabbyDog in forum Excel General
    Replies: 5
    Last Post: 03-17-2013, 12:56 PM
  6. Left, Right, Mid, Find...
    By Petitboeuf in forum Excel General
    Replies: 4
    Last Post: 02-27-2007, 11:12 AM

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