+ Reply to Thread
Results 1 to 5 of 5

Need help removing all symbols from a random string generator...

  1. #1
    Forum Contributor
    Join Date
    09-07-2010
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    358

    Need help removing all symbols from a random string generator...

    The following code removes the symbols what can't be used on files on windows, however I want the following to ignore ALL symbols and just be letters and numbers only.

    Anyone know how it can be done?

    Please Login or Register  to view this content.

    Thanks in advance
    - Hy

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Need help removing all symbols from a random string generator...

    You would need to figure out the "Chr()" number for ALL symbols you want to ignore. Then you just add those numbers to the Array.

  3. #3
    Forum Contributor
    Join Date
    09-07-2010
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    358

    Re: Need help removing all symbols from a random string generator...

    Is there no way to make it only cycle through the first so many characters, aren't letters and numbers like 1 to 98 on the character list

  4. #4
    Forum Expert JasperD's Avatar
    Join Date
    05-07-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2016
    Posts
    1,393

    Re: Need help removing all symbols from a random string generator...

    Try this :

    It replaces anything that's not a letter or a number with a space. If you want it to be just removed, then change the code to say "" instead of " " in the replace part

    Please Login or Register  to view this content.
    Please click the * below if this helps
    Please click the * below if this helps

  5. #5
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Need help removing all symbols from a random string generator...

    Hyflex,

    It's probably easiest to define what is valid and then make a random string out of just those characters:
    Please Login or Register  to view this content.
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

+ 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: 5
    Last Post: 06-21-2013, 10:40 AM
  2. Random Name Generator
    By jsbryan in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-13-2012, 10:44 AM
  3. VBA Random Generator
    By switm in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-22-2011, 02:22 PM
  4. random name generator
    By rookie37 in forum Excel General
    Replies: 16
    Last Post: 06-23-2009, 03:00 AM
  5. Random Generator
    By Duncan1 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-11-2007, 08:07 PM

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