Example
Generic Formula
- Lower – This is an integer value and will depend on what type of character you want to generate.
- Upper – This is an integer value and will depend on what type of character you want to generate.
What It Does
This formula will generate a random letter or symbol.
How It Works
RANDBETWEEN(Lower,Upper) will generate a random integer value between the Lower and Upper values. We then convert this randomly generated number into its ASCII character equivalent using the CHAR function.
- CHAR(N) for N = 65 to 90 will result in the characters A to Z
- CHAR(N) for N = 97 to 122 will result in the characters a to z
- CHAR(N) for N = 33 to 47 will result in the characters ! ” # $ % & ‘ ( ) * + , – . /
- CHAR(N) for N = 58 to 64 will result in the characters : ; < = > ? @
- CHAR(N) for N = 91 to 96 will result in the characters [ \ ] ^ _ `
In our example RANDBETWEEN(65,90) resulted in a value of 84 and CHAR(84) returns the character T.
0 Comments