+ Reply to Thread
Results 1 to 5 of 5

Using mid to return txt of diffent lenths from block txt

Hybrid View

  1. #1
    Registered User
    Join Date
    12-14-2009
    Location
    Nottingham
    MS-Off Ver
    Microsoft D365
    Posts
    93

    Using mid to return txt of diffent lenths from block txt

    Hi there i wasnt to split a written address out into its componant parts and populate them in seperate columns. I know how to use left right and mid to do this if the txt is the same lenth but is there anyway i can get it to use spaces to then work out how many charictors to return per cell?

    Please see the attached example.

    Thanks
    Attached Files Attached Files
    Last edited by Notters; 02-20-2012 at 11:21 AM.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,423

    Re: Using mid to return txt of diffent lenths from block txt

    You can use SEARCH or FIND to get the position of the commas, and so you use this within each LEFT, RIGHT or MID function. I'll put something together in your workbook and get back to you.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    12-14-2009
    Location
    Nottingham
    MS-Off Ver
    Microsoft D365
    Posts
    93

    Re: Using mid to return txt of diffent lenths from block txt

    Thanks Pete, that would be amazing!

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,423

    Re: Using mid to return txt of diffent lenths from block txt

    I've put the appropriate formulae in the attached workbook, for up to 4 address lines plus a postcode. For it to work correctly, there must be at least two address lines, a postcode at the end, and commas must separate each part of the address - you had full-stops in a couple of places.

    Hope this helps.

    Pete
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    12-14-2009
    Location
    Nottingham
    MS-Off Ver
    Microsoft D365
    Posts
    93

    Re: Using mid to return txt of diffent lenths from block txt

    Thanks for all your help on this

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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