Quick answer: type =CHAR(RANDBETWEEN(65,90)) into any cell for a random uppercase letter, or =CHAR(RANDBETWEEN(97,122)) for lowercase. This works in both Excel and Google Sheets. Below are formulas for vowels, random strings, letters + numbers, and letters without repeats.
Single random letter formulas
| What you want | Formula | Works in |
|---|---|---|
| Random uppercase letter (A–Z) | =CHAR(RANDBETWEEN(65,90)) | Excel & Sheets |
| Random lowercase letter (a–z) | =CHAR(RANDBETWEEN(97,122)) | Excel & Sheets |
| Random vowel | =MID("AEIOU",RANDBETWEEN(1,5),1) | Excel & Sheets |
| Random letter from your own list | =MID("ABCXYZ",RANDBETWEEN(1,LEN("ABCXYZ")),1) | Excel & Sheets |
| Letter + digit (e.g. K7) | =CHAR(RANDBETWEEN(65,90))&RANDBETWEEN(0,9) | Excel & Sheets |
How the formula works
Every character has a number code. Capital A is 65 and capital Z is 90, while lowercase a to z are 97 to 122. RANDBETWEEN(65,90) picks a whole number in that range with an equal chance for each, and CHAR() converts it into the matching letter. So every letter from A to Z has the same 1-in-26 chance.
Random string of letters
To get several random letters in one cell, such as an 8-letter code:
Excel 365 / Excel 2021+
=CONCAT(CHAR(RANDARRAY(8,1,65,90,TRUE)))
Google Sheets
=JOIN("",ARRAYFORMULA(CHAR(65+INT(RANDARRAY(8,1)*26))))Older Excel (2019 and earlier): join single-letter formulas with &:
=CHAR(RANDBETWEEN(65,90))&CHAR(RANDBETWEEN(65,90))&CHAR(RANDBETWEEN(65,90))
Change the 8 to the length you need.
Random letters and numbers
For a code with two letters and two digits, like KD07:
=CHAR(RANDBETWEEN(65,90))&CHAR(RANDBETWEEN(65,90))&TEXT(RANDBETWEEN(0,99),"00")
TEXT(…,"00") keeps the leading zero, so 7 shows as "07". For bulk alphanumeric codes, our random letter and number generator makes up to 100 at once with no duplicates.
Random letters without repeats
To draw several different letters, shuffle the alphabet and take the first few:
Excel 365
=TAKE(SORTBY(CHAR(SEQUENCE(26,1,65)),RANDARRAY(26)),5)
Google Sheets
=ARRAY_CONSTRAIN(SORT(CHAR(SEQUENCE(26,1,65)),RANDARRAY(26,1),TRUE),5,1)
Each formula spills 5 unique letters down the column.
Stop the letters from changing
Random functions recalculate whenever anything in the sheet changes, and in Excel whenever you press F9. To freeze a result, select the cells, copy them, and paste them back as values: Paste Special → Values in Excel, or Ctrl+Shift+V (Cmd+Shift+V on Mac) in Google Sheets.
Prefer not to use a spreadsheet?
The free random letter generator gives you a letter in one click. It can also make a list of up to 1,000 random letters in 20 alphabets that you can paste straight into Excel, plus letters + numbers, vowels only, and no-repeat options. Developers can see the Python and Java versions.
Frequently asked questions
How do I generate a random letter in Excel?
Type =CHAR(RANDBETWEEN(65,90)) into a cell. RANDBETWEEN picks a number from 65 to 90, which are the character codes for A to Z, and CHAR turns that number into the letter. Use 97 and 122 for lowercase.
Does the same formula work in Google Sheets?
Yes. =CHAR(RANDBETWEEN(65,90)) works the same in Google Sheets. Only the multi-letter string formulas differ, because RANDARRAY and CONCAT work differently in the two apps.
Why does my random letter keep changing?
RANDBETWEEN and RANDARRAY recalculate every time the sheet changes. To keep a result, copy the cells and paste them back as values: Paste Special → Values in Excel, or Ctrl+Shift+V in Google Sheets.
How do I get random letters without repeats in Excel?
In Excel 365, use =TAKE(SORTBY(CHAR(SEQUENCE(26,1,65)),RANDARRAY(26)),5) to get 5 different letters. Change the 5 to the number of letters you need (up to 26).
Is there a faster way?
If you just need letters and not a spreadsheet, the free random letter generator on this site gives you a letter, a list of up to 1,000 letters, or letters + numbers in one click, ready to copy.