+ Reply to Thread
Results 1 to 3 of 3

Deleting string before certain string (word)

  1. #1
    Registered User
    Join Date
    10-27-2010
    Location
    Sheffield
    MS-Off Ver
    Excel 2003
    Posts
    4

    Deleting string before certain string (word)

    Hi guys,

    I have a problem - the thing is I need to delete every word (string) before the word "from".
    The example is:

    CAT HILL(A110 PART) From OPPOSITE EAST BARNET ROAD To B/BDY 45 m PAST MANSFIELD AVENUE

    and I want to have:

    OPPOSITE EAST BARNET ROAD To B/BDY 45 m PAST MANSFIELD AVENUE

    I have over 3k records, I imagine this isn't very difficult task, but I'm not very good with VBA;-)

    Cheers,
    Peter

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Deleting string before certain string (word)

    =MID(A1,SEARCH("from ",A1)+5,255)
    or if there is only ever one "from" use find/replace find "*from " (without quotes but include space)
    replace with nothing
    Last edited by martindwilson; 10-27-2010 at 08:37 AM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Deleting string before certain string (word)

    see also REPLACE function.

+ 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