Generate Random Letters


I have previously detailed how to use the RANDBETWEEN function to generate random numbers and dates. This is useful when creating dashboards (when you do not yet have your dataset to work with).

However earlier this week, Chris a reader of this blog wanted to know how to generate random letters.

Well the solution to Chris’s problem is solved using RANDBETWEEN. 

However we want to return the character specified by the code number from the character set on your computer.


A
B
C
1
Result
Formula
Description
2
M
=CHAR(RANDBETWEEN(65,90))
returns one uppercase letter
3
a
=CHAR(RANDBETWEEN(97,122))
 returns one lowercase letter
4
SZ
=CHAR(RANDBETWEEN(65,90)) & CHAR(RANDBETWEEN(65,90))  
returns two uppercase letter
5

Hope this helps Chris. Thanks for stopping by and keep the questions coming…

No comments:

Post a Comment