+ Reply to Thread
Results 1 to 19 of 19

Generate random Code consist of number and letter using VBA code

  1. #1
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Generate random Code consist of number and letter using VBA code

    Dear All
    i would like to use VBA code in excel to generate random Alphanumric in range of cell for example A1:A19
    or for another case
    A1 : C12

    i search on internet and found code but it work with access and find its very useful to use it
    as the following
    HTML Code: 
    i will be thankful if we can create something like this in userform in excel that enable select width of random needed like in attached photo but instead to result will put range of cell needed
    Attached Images Attached Images

  2. #2
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: Generate random Code consist of number and letter using VBA code

    here the design for user-form need to make the code
    Attached Files Attached Files

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

    Re: Generate random Code consist of number and letter using VBA code

    If you have no rule in order.
    Please Login or Register  to view this content.
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: Generate random Code consist of number and letter using VBA code

    What you mean by no rules in order

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

    Re: Generate random Code consist of number and letter using VBA code

    Rule of random string.

  6. #6
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: Generate random Code consist of number and letter using VBA code

    and what about sheet list or give option to create new sheet or workbook

  7. #7
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: Generate random Code consist of number and letter using VBA code

    i want to generate number plus alphabetical (capital and small)

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

    Re: Generate random Code consist of number and letter using VBA code

    Your title says
    Generate random Code consist of number and letter using VBA code

  9. #9
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: Generate random Code consist of number and letter using VBA code

    yes number and letter

  10. #10
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: Generate random Code consist of number and letter using VBA code

    let me know if there is any wrong that can i correct it

  11. #11
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: Generate random Code consist of number and letter using VBA code

    or if you want to make new thread

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

    Re: Generate random Code consist of number and letter using VBA code

    You need to explain what you are really trying to do.

  13. #13
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: Generate random Code consist of number and letter using VBA code

    ok
    i want to generate random alphanumeric consist of number and letter (capital and small ) with different length
    and i get this idea to make userform to give me many flexibility to choice
    1- that enable me to select length of random generated
    2- enable to select range of the cell
    3- select the sheet name that i will generate this data from sheet list
    4- give me another option to create new sheet (with box to enter name of new sheet ) or give option to create new workbook
    that all
    what i need because i will use this for generate code for many and will take this for printing with another software
    hope you now understand me

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

    Re: Generate random Code consist of number and letter using VBA code

    See if this is how you wanted.
    Attached Files Attached Files

  15. #15
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: Generate random Code consist of number and letter using VBA code

    its working but its give me only one option new sheet without give me choice to enter the name of new sheet
    because i will generate lot of sheet for different work
    also not allow to enter the range just must select ( the reason want to enter the range is i will generate for lot of cells )

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

    Re: Generate random Code consist of number and letter using VBA code

    Try this one
    Attached Files Attached Files

  17. #17
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: Generate random Code consist of number and letter using VBA code

    its work very good but no any option to allow see if the list of sheet available that can i generate
    also if want to enter number of the cell want to generate for example generate 1000 cell in any range
    really many thanks for your help and concern and your patience
    Last edited by mazan2010; 06-27-2017 at 07:01 AM.

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

    Re: Generate random Code consist of number and letter using VBA code

    ............................
    Attached Files Attached Files

  19. #19
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: Generate random Code consist of number and letter using VBA code

    dear jindon
    many thanks for your help and your solution

+ 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. Generate Random code for sampling for Different operator
    By mazan2010 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-16-2016, 07:32 AM
  2. Sorting/filtering specific letter/s in a random code
    By squareeyes in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-07-2013, 11:47 PM
  3. Replies: 5
    Last Post: 06-21-2013, 10:40 AM
  4. vba code to generate random z-scores for normal distribution
    By bruceday in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-30-2012, 02:07 PM
  5. [SOLVED] Generate random 6-16-byte random hexadecimal number
    By jsamuelshn in forum Excel General
    Replies: 6
    Last Post: 07-20-2012, 10:38 AM
  6. Creating sinle random letter - code not working
    By Julesdude in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-27-2012, 09:38 AM
  7. generate a random number and use if function to generate new data
    By Dogdoc1142 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-25-2006, 10:50 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