Loading
Ozgrid Excel Help & Best Practices Forums

Excel Training / Excel Dashboards Reports



Results 1 to 6 of 6

Thread: Find Text Between Characters And Remove Hyphens

  1. #1
    Join Date
    19th September 2006
    Posts
    7

    Find Text Between Characters And Remove Hyphens

    I need to make a macro that will find text between "o/" and "/", remove hyphens from the text it found, and then add it to the end of the current cell contents.

    I know how to add to the end of current cell contents, but cannot figure out how to grab text between certain characters or replace hyphens and replace with spaces.

    Excel Video Tutorials / Excel Dashboards Reports


  2. #2
    Join Date
    11th July 2006
    Posts
    36

    Re: Find Text Between Characters And Remove Hyphens

    If cell [A1] is "some chars o/gumpy-dumpy-sumpy/ other stuff"

    The following formula:

    =SUBSTITUTE(LEFT(MID(A1,FIND("o/",A1)+2,LEN(A1)),FIND("/",MID(A1,FIND("o/",A1)+2,LEN(A1)))-1),"-"," ")
    some chars o/gumpy-dumpy-sumpy/ other stuff
    gets you want you've asked for:

    gumpy dumpy sumpy

    That is, SUBSTITUTE() replaces characters, FIND() tells you locations of characters within strings, and MID() and LEFT() get you appropriate portions of strings.
    Last edited by Mark Wyld; September 19th, 2006 at 05:13.

    Excel Video Tutorials / Excel Dashboards Reports


  3. #3
    Join Date
    19th September 2006
    Posts
    7

    Re: Find Text Between Characters And Remove Hyphens

    Thank you! That works great. Also thanks for the explanation of the code.

    Excel Video Tutorials / Excel Dashboards Reports


  4. #4
    Join Date
    18th November 2004
    Location
    God's Own Country
    Posts
    4,648

    Re: Find Text Between Characters And Remove Hyphens

    Or..

    =SUBSTITUTE(MID(A1,FIND("o/",A1)+2,SUM(FIND({"o^","/"},SUBSTITUTE(A1,"o/","o^"))*{-1,1})-2),"-"," ")

    HTH

  5. #5
    Join Date
    20th October 2013
    Posts
    4

    Re: Find Text Between Characters And Remove Hyphens

    Sorry to dig up an old thread here but I have a really similar question and I'm sure someone here will be able to help. We're basically being attacked by negative SEO and they're using hosts and hosts of sub domains which we need to remove from our disavow.txt file. Let me try to explain.

    We have a list with things like this:

    domain:algology.digibookmarks.com
    domain:arolo.digibookmarks.com
    domain:jester.digibookmarks.com
    domain:clamp.digibookmarks.com
    domain:hah.digibookmarks.com

    We need to remove the text between "domain:" and the first "." So in the list above we need to remove algology and jester and clamp etc.

    Can anyone please help?

    Excel Video Tutorials / Excel Dashboards Reports


  6. #6
    Join Date
    23rd October 2003
    Location
    Alsace France
    Posts
    4,099

    Re: Find Text Between Characters And Remove Hyphens

    silkblooms,
    Welcome with us but open your thread and make reference to this one if you need.
    PCI
    Triumph without peril brings no glory: Just try

Thread Information

Users Browsing this Thread

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

Possible Answers

  1. Remove Multiple Characters From Text
    By piper23 in forum Excel General
    Replies: 8
    Last Post: July 14th, 2010, 08:10
  2. Replies: 5
    Last Post: March 28th, 2008, 12:12
  3. Remove 1st X Characters From Text In Range
    By lowtusmaximus in forum Excel General
    Replies: 7
    Last Post: March 2nd, 2008, 09:30
  4. Remove all hyphens from a cell
    By Brich in forum Excel General
    Replies: 3
    Last Post: August 24th, 2006, 20:33
  5. Remove Characters from Text for saving a file
    By shawnjoreilly in forum Excel General
    Replies: 3
    Last Post: September 5th, 2005, 08:28

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
  •  
porno