+ Reply to Thread
Results 1 to 4 of 4

How do I create 6-character upper/lower case code macro/formula?

  1. #1
    Registered User
    Join Date
    02-06-2014
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    1

    How do I create 6-character upper/lower case code macro/formula?

    I am somewhat new to Excel. I dont have any experience in creating formulas or macros in Excel.
    I need to create a way to randomly generate 6-character codes like vW4Rhy, Loe49a, or Ccre90.
    each column can use alpha (upper/lower) and numeric characters.

    What is the best way and how can I do this?

    Any help is appreciated.

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: How do I create 6-character upper/lower case code macro/formula?

    Will create random A-Z Character

    =CHAR(RANDBETWEEN(65,90))

    Repeating it 6 times will produce 6 random A-Z characters

    =CHAR(RANDBETWEEN(65,90))&CHAR(RANDBETWEEN(65,90))&CHAR(RANDBETWEEN(65,90))&CHAR(RANDBETWEEN(65,90))&CHAR(RANDBETWEEN(65,90))&CHAR(RANDBETWEEN(65,90))

    Will create random a-z Character

    =CHAR(RANDBETWEEN(97,122))

    Repeating it 6 times will produce 6 random a-z characters

    =CHAR(RANDBETWEEN(97,122))&CHAR(RANDBETWEEN(97,122))&CHAR(RANDBETWEEN(97,122))&CHAR(RANDBETWEEN(97,122))&CHAR(RANDBETWEEN(97,122))&CHAR(RANDBETWEEN(97,122))

    Joining both will produce 6 random characters of A-Z and 6 random characters of a-z

    =CHAR(RANDBETWEEN(65,90))&CHAR(RANDBETWEEN(65,90))&CHAR(RANDBETWEEN(65,90))&CHAR(RANDBETWEEN(65,90))&CHAR(RANDBETWEEN(65,90))&CHAR(RANDBETWEEN(65,90))&CHAR(RANDBETWEEN(97,122))&CHAR(RANDBETWEEN(97,122))&CHAR(RANDBETWEEN(97,122))&CHAR(RANDBETWEEN(97,122))&CHAR(RANDBETWEEN(97,122))&CHAR(RANDBETWEEN(97,122))


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Valued Forum Contributor adyteo's Avatar
    Join Date
    01-10-2013
    Location
    Calgary
    MS-Off Ver
    Excel 2010
    Posts
    540

    Re: How do I create 6-character upper/lower case code macro/formula?

    try this one (pretty long)
    Please Login or Register  to view this content.
    Click on the star if you think I helped you

  4. #4
    Forum Expert Debraj Roy's Avatar
    Join Date
    09-27-2012
    Location
    New Delhi,India
    MS-Off Ver
    Excel 2013
    Posts
    1,469

    Re: How do I create 6-character upper/lower case code macro/formula?

    With respect to SS.. just a lil bit modification...

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    and a vba one...

    Please Login or Register  to view this content.
    In cell write formula as "=SixTHRnd()"

    both will calculate in calculation.
    Regards!
    =DEC2HEX(3563)

    If you like someone's answer, click the star to give them a reputation point for that answer...

+ 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. [SOLVED] Convert 1st letter of word to Upper Case and rest to lower case
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-23-2013, 11:44 AM
  2. Determine whether a character is Upper or Lower case
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-02-2005, 05:50 PM
  3. How do I create upper/lower case letters in cells?
    By boz130 in forum Excel General
    Replies: 1
    Last Post: 09-14-2005, 02:06 PM
  4. Replies: 14
    Last Post: 08-25-2005, 10:05 PM
  5. Replies: 1
    Last Post: 03-09-2005, 05:06 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