+ Reply to Thread
Results 1 to 6 of 6

Get text after 3rd space and text before 3rd space

  1. #1
    Forum Contributor
    Join Date
    07-29-2013
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    110

    Exclamation Get text after 3rd space and text before 3rd space

    Hi,

    I am working with Addresses on this one.

    format sample: 1 High Street Sydney NSW 2000

    I would like to extract:
    "1 High Street" in a different column
    "Sydney NSW 2000" in a different column

    Appreciate any help

  2. #2
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2404
    Posts
    13,406

    Re: Get text after 3rd space and text before 3rd space

    Do you have more samples? What works with the one might not with others.

    Edit.
    If it's always the 3rd space as your title suggests try this. With the string in A1, this formula in B1 fill across.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by FlameRetired; 12-04-2015 at 12:08 AM.
    Dave

  3. #3
    Forum Contributor
    Join Date
    07-29-2013
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    110

    Re: Get text after 3rd space and text before 3rd space

    That works perfect in getting the street address (i.e "1 High Street") !!
    How can i get the text string after the 3rd space? (i.e "Sydney NSW 2000")?

    What I want is:
    A1: 1 High Street Sydney NSW 2000
    B1 = 1 High Street
    C1 = Sydney NSW 2000

  4. #4
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2404
    Posts
    13,406

    Re: Get text after 3rd space and text before 3rd space

    Yes. This formula does that. With the string in A1 enter that formula into B1. Grab the fill handle and fill across to C1.

    Row\Col
    A
    B
    C
    D
    1
    1 High Street Sydney NSW 2000 1 High Street Sydney NSW 2000 In B1: =TRIM(MID(SUBSTITUTE($A1," ",REPT(" ",99),3),(COLUMNS($A:A)-1)*99+1,99))
    2
    Last edited by FlameRetired; 12-04-2015 at 12:21 AM.

  5. #5
    Forum Contributor
    Join Date
    07-29-2013
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    110

    Re: Get text after 3rd space and text before 3rd space

    I didnt think to move the formula to the next column! it works like a charm! thank you

  6. #6
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2404
    Posts
    13,406

    Re: Get text after 3rd space and text before 3rd space

    You are welcome. Thanks for the feedback and rep.

+ 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. [SOLVED] Extra space or spaces in Text in Forum Post. BB Code for extra space ?
    By Doc.AElstein in forum The Water Cooler
    Replies: 21
    Last Post: 03-02-2016, 02:59 PM
  2. parsing text return space to space
    By dosmastr in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-15-2015, 12:09 AM
  3. [SOLVED] Remove Blanc Space, parse text, convert text to measurement
    By plans in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-25-2015, 07:50 PM
  4. Replies: 4
    Last Post: 07-25-2013, 05:28 AM
  5. Cell wrap text: Some cells have blank white space above text
    By stuckagain in forum Excel - New Users/Basics
    Replies: 10
    Last Post: 06-09-2009, 06:47 AM
  6. Text Space Limitations
    By wilro85 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-15-2008, 01:30 AM
  7. Remove Space in Text
    By Tian in forum Excel General
    Replies: 5
    Last Post: 04-06-2006, 02:15 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