Random Alphanumeric Values in Excel

Jeff,

I was in your Excel course in awhile back.

I was wondering if you had a way to generate random alphanumeric values in MS Excel to be used for assigning passwords?

Any help would be appreciated.

Steve

No problem

Steve,
Generating random numbers and random alphanumeric values in Excel is not a problem.  There are three key functions needed:

  • RANDBETWEEN() which will create a random number between the first function argument and the second function argument.
  • CHAR() which will convert an ASCII number in to its text equivalent
  • CONCATENATE() (and alternatively the concatenation operator &) which will combine text and values

To create a random 3-digit number between 100 and 999, use the following function:
  =RANDBETWEEN(100,999)

To create a random letter, use the following function:
  =CHAR(RANDBETWEEN(65,90))

(Note: in ASCII 65 is A and 90 is Z)

To create a random alphanumeric string that has two letters and then two numbers, use:
  =CHAR(RANDBETWEEN(65,90))&CHAR(RANDBETWEEN(65,90))&RANDBETWEEN(10,99)

Ping me back if I can help further on this one.

Thanks
Jeff

Perfect!

Perfect, thanks Jeff!

Random Alphanumeric Values in Excel