+ Reply to Thread
Results 1 to 5 of 5

Delete Everything Before and After Characters in String

  1. #1
    Banned User!
    Join Date
    12-08-2010
    Location
    usa
    MS-Off Ver
    Excel 2007
    Posts
    18

    Delete Everything Before and After Characters in String

    What function can delete everything before and after in a string?

    So for the following example, how can I delete the string "http://www.excelforum.com/newthread.php?do=" and everything after the "&" like "&ip=123.1.865&date=1208"

    I only want words between the first = and first & in the strings below. Without the + signs would be very helpful.

    Please Login or Register  to view this content.

    Any help would be soo much appreciated!
    Last edited by jcholla; 12-08-2010 at 12:25 PM.

  2. #2
    Forum Contributor
    Join Date
    05-27-2008
    Location
    Newcastle Upon Tyne UK
    MS-Off Ver
    XP Excel 2003
    Posts
    105

    Re: Delete Everything Before and After Characters in String

    This will give you the words/characters between the first = and + : it assumes that + is after =

    =MID(A1,FIND("=",A1)+1,FIND("+",A1)-FIND("=",A1)-1)

    edvwvw

  3. #3
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Delete Everything Before and After Characters in String

    Is this what you need ?
    Please Login or Register  to view this content.

  4. #4
    Banned User!
    Join Date
    12-08-2010
    Location
    usa
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Delete Everything Before and After Characters in String

    Quote Originally Posted by edvwvw View Post
    This will give you the words/characters between the first = and + : it assumes that + is after =

    =MID(A1,FIND("=",A1)+1,FIND("+",A1)-FIND("=",A1)-1)

    edvwvw
    i may have done something wrong, but that did not work for me.

    Quote Originally Posted by arthurbr View Post
    Is this what you need ?
    Please Login or Register  to view this content.
    this worked for me beautifully. thank you very much! +reps

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

    Re: Delete Everything Before and After Characters in String

    another alternative (FWIW)

    Please Login or Register  to view this content.

+ 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