+ Reply to Thread
Results 1 to 11 of 11

Find and replace characters.

  1. #1
    Forum Contributor
    Join Date
    11-11-2007
    Posts
    263

    Find and replace characters.

    I an attempting to write a script that can find things like "\"," " ", "*", and even ","..., now I need to replace them with either "-" or nothing. Is there a way to do this if so how?

    But in editing, I can't remove the cell itself... it will look like this. Nexx Systems, Inc. and will become Nexx Systems Inc

    Thanks.
    Last edited by Cyberpawz; 06-04-2012 at 11:30 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    03-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    1,093

    Re: Find and replace characters.

    You don't just want to use Find and Replace? You want a macro?

  3. #3
    Forum Contributor
    Join Date
    11-11-2007
    Posts
    263

    Re: Find and replace characters.

    Quote Originally Posted by rvasquez View Post
    You don't just want to use Find and Replace? You want a macro?
    I need a macro because I can't trust people to do a find and replace every time they need to do so.

  4. #4
    Valued Forum Contributor
    Join Date
    03-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    1,093

    Re: Find and replace characters.

    Okay below is a code that should work for you

    Please Login or Register  to view this content.
    To enter the code as a macro hold down the Alt key and press F8. In the macro name box provided delete anything in it and then type GetSymbol and select the create option.

    In between the
    Please Login or Register  to view this content.
    and the text
    Please Login or Register  to view this content.
    Copy and paste the above code.

    Then exit out of VBA. To run the code select Alt+F8 again and then select the GetSymbol option and select Run.

    Let me know if this works for you!

    Thanks!

  5. #5
    Forum Contributor
    Join Date
    11-11-2007
    Posts
    263

    Re: Find and replace characters.

    Quote Originally Posted by rvasquez View Post
    Okay below is a code that should work for you

    Please Login or Register  to view this content.
    To enter the code as a macro hold down the Alt key and press F8. In the macro name box provided delete anything in it and then type GetSymbol and select the create option.

    In between the
    Please Login or Register  to view this content.
    and the text
    Please Login or Register  to view this content.
    Copy and paste the above code.

    Then exit out of VBA. To run the code select Alt+F8 again and then select the GetSymbol option and select Run.

    Let me know if this works for you!

    Thanks!
    How do I add in multiple items? I know which ones I need replaced? I just need the code to run, I really don't want an input box, I hope you understand but basically I am trying to make this work without the end user knowing it's being done for them.
    Last edited by Cyberpawz; 06-04-2012 at 12:33 PM.

  6. #6
    Forum Contributor
    Join Date
    11-11-2007
    Posts
    263

    Re: Find and replace characters.

    I found this, but I need to only change what is in S and T, down to the last row of each...

    Please Login or Register  to view this content.
    The other issue is I need to make this work on a specific sheet, not the entire workbook...

    What I'd like it to do is to replace the extra characters with a "-" even the ", so that it can be made into a folder. Basically I have this as a script so far:

    Please Login or Register  to view this content.
    But for some reason it's not replacing the " and the , as it should in theory...
    Last edited by Cyberpawz; 06-04-2012 at 01:16 PM.

  7. #7
    Valued Forum Contributor
    Join Date
    03-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    1,093

    Re: Find and replace characters.

    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    11-11-2007
    Posts
    263

    Re: Find and replace characters.

    Sorry but *Bump* hoping someone can help

  9. #9
    Forum Contributor
    Join Date
    11-11-2007
    Posts
    263

    Re: Find and replace characters.

    Quote Originally Posted by rvasquez View Post
    Please Login or Register  to view this content.
    I think you responded before I edited the post. I'll use what you have if nothing else can be done, but I need it for two columns, not the entire sheet.
    Last edited by Cyberpawz; 06-04-2012 at 01:21 PM.

  10. #10
    Valued Forum Contributor
    Join Date
    03-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    1,093

    Re: Find and replace characters.

    This will work for a specific sheet name and columns S and T.

    Please Login or Register  to view this content.
    I'm sorry, I would try and incorporate it into your code but I'm just not following your code. Sorry.

  11. #11
    Forum Contributor
    Join Date
    11-11-2007
    Posts
    263

    Re: Find and replace characters.

    My code is a mess, but it makes sense with what I see all the time, I decided to go another route. it's ugly but it works.
    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