+ Reply to Thread
Results 1 to 6 of 6

Deleting the * character itself using VBA

  1. #1
    Registered User
    Join Date
    12-07-2012
    Location
    London, England
    MS-Off Ver
    Office 2010
    Posts
    81

    Deleting the * character itself using VBA

    I've imported a fairly large Lexicon from Word into Excel.

    I've now discovered that a lot of the words end with a star. This was obviously significant to the creator, but is havoc for me. Apart from anything else, a word being looked for that has a star on the end of it will never be found.

    So, how do I remove the * wherever it is in the worksheet, given that it's a wildcard character?

    Help much appreciated.

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,522

    Re: Deleting the * character itself using VBA

    Use caret in replace word

    ~*

  3. #3
    Registered User
    Join Date
    12-07-2012
    Location
    London, England
    MS-Off Ver
    Office 2010
    Posts
    81

    Re: Deleting the * character itself using VBA

    Hi,

    You said caret but you put a tilde. I tried them both but neither of them worked.

    Here's the code:

    Please Login or Register  to view this content.
    I am doing several selection.replace, one after the other, on the same data to the same pattern, but this is the only one that doesn't work. What am I doing wrong?

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,522

    Re: Deleting the * character itself using VBA

    It's a tilda....

    Please Login or Register  to view this content.
    Should do it

  5. #5
    Registered User
    Join Date
    12-07-2012
    Location
    London, England
    MS-Off Ver
    Office 2010
    Posts
    81

    Re: Deleting the * character itself using VBA

    Hi,

    That worked fine for the single column, but I can't make it work when searching the multi-column range as above. So for now I'm just cheating and running it over each column one by one!

    This will do for now, but if you find what's wrong I'd be glad to know.

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,522

    Re: Deleting the * character itself using VBA

    It should...
    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