+ Reply to Thread
Results 1 to 5 of 5

How do I remove text before and after certain data in a column

  1. #1
    Registered User
    Join Date
    10-17-2014
    Location
    USA
    MS-Off Ver
    MAC office 2011
    Posts
    2

    How do I remove text before and after certain data in a column

    I have an excel file that has a column that displays a web source URL. The data looks like this....

    http://carter.mydomain.com/page1
    http://expert.mydomain.com/page4
    http://10629.mydomain.com/sample
    http://genius.mydomain.com/form-1
    etc

    What I need to do is remove everything before and including the (http://) and everything after the first (.) So in the previous examples, I want to be left with the following data in the columns

    carter
    expert
    10629
    genius

    Thanks in advance for any help with this. Karen

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: How do I remove text before and after certain data in a column

    Try this:
    Please Login or Register  to view this content.
    Is that something you can work with?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Registered User
    Join Date
    10-17-2014
    Location
    USA
    MS-Off Ver
    MAC office 2011
    Posts
    2

    Re: How do I remove text before and after certain data in a column

    Wow that worked great. Thanks. The only issue that I had was that I just noticed that some of my URLs were actually "https://" instead of just "http://" . Is there a way to add an "and/or" function that would pull out either one, no matter if it was "https://" or "http://"?

    Thank you so much.
    Karen

  4. #4
    Valued Forum Contributor
    Join Date
    07-07-2014
    Location
    Washington DC
    MS-Off Ver
    2007
    Posts
    1,047

    Re: How do I remove text before and after certain data in a column

    Only because I want to get notified when Ron responds with a more elegant solution, I'll offer up my attempt below.

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  5. #5
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: How do I remove text before and after certain data in a column

    Try this:
    Please Login or Register  to view this content.
    Does that help?

+ 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. Replies: 3
    Last Post: 04-09-2020, 09:22 AM
  2. Remove partial text from 1 column?
    By IsabellaLearning in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-03-2014, 04:06 AM
  3. Replies: 8
    Last Post: 12-02-2013, 02:48 AM
  4. Macro to remove rows of data when cells in a column contain certain text
    By RF8899 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-05-2012, 07:35 PM
  5. Remove text from column
    By Tellm in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-26-2009, 03:34 PM

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