+ Reply to Thread
Results 1 to 5 of 5

how to remove text contained with speech marks

Hybrid View

  1. #1
    Registered User
    Join Date
    04-24-2012
    Location
    San Francisco, USA
    MS-Off Ver
    Excel 2007
    Posts
    60

    how to remove text contained with speech marks

    I have the following list:

    peter "dog"
    jake "cat"
    richard "horse"
    nathan "sheep"

    ....etc (there are hundreds of them)

    I would like to remove all strings contained within speech marks as wells as the speech marks themselves. so the list would become:

    peter
    jake
    richard
    nathan

    ....etc

    How would I do this using VBA?

    Many thanks in advance

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: how to remove text contained with speech marks

    Without VBA

    CNTL + H

    find "*"

    replace by (leave empty)

    replace all.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Registered User
    Join Date
    04-24-2012
    Location
    San Francisco, USA
    MS-Off Ver
    Excel 2007
    Posts
    60

    Re: how to remove text contained with speech marks

    great thanks. alot easier

  4. #4
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: how to remove text contained with speech marks

    Sub b()
    Set Rng = ActiveSheet.UsedRange
    Rng.Replace What:="""*""", Replacement:="", _
        SearchOrder:=xlByColumns, MatchCase:=True
    End Sub
    If solved remember to mark Thread as solved

  5. #5
    Registered User
    Join Date
    04-24-2012
    Location
    San Francisco, USA
    MS-Off Ver
    Excel 2007
    Posts
    60

    Re: how to remove text contained with speech marks

    thanks patel45. Question what exactly is UsedRange?
    thanks

+ 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