Home โ Excel Formulas โ **How to Quickly Generate Random Letters in Excel**

Ever faced a situation where you need to generate random letters? Well, sometimes you do need to generate some random alphabets.

Right?

In Excel, you have functions like RAND and RANDBETWEEN to generate random numbers but we donโt have any particular function to generate letters.

Today, Iโd like to share with you an amazing formula trick to generate random letters in Excel. And, the best part is itโs simple and easy to use.

## So whatโs the Formula to Generate Random Letters in Excel?

As I said, there is no direct function in excel that can help you to get random letters/alphabets. But, you can use a **combination of RANDBETWEEN and CHAR** to create a formula to get random letters.

## If you want to Generate CAPITAL Random Letters

In this formula, you need to use 65 and 90 for the random letter to be in the capital letter.

=CHAR(RANDBETWEEN(65,90))

## Or if you want to Generate Small Random Letters:

In this formula, you need to use 97 and 122 for the random letter to be in the capital letter.

=CHAR(RANDBETWEEN(97,122))

## How this formula works

Now, let me tell you how does this formula generate these letters. **First of all,** you have to understand that this formula works in two different parts.

In the **first part**, you have the RANDBETWEEN function which can generate random numbers for you. You just have to specify the lowest number and highest number and it will return a random number from that range. In short, you will get a random number in the result within the range.

Now, in the **second part**, you have the CHAR function which can return a specific character when you specify a number in it. That means for each character there is a specific number you have to insert in the CHAR function. And numbers 65 to 90 represent capital letters and 97 to 122 small letters.

If you enter 65 in CHAR it will return โAโ and for 97 it will return โaโ.

**The Bottom Line is:**

- When you specify any of the above range in RANDBETWEEN returns a random number.
- And after that CHAR returns a character for that number.

This is the whole story.

## In the end,

The formula you have used above is simple and easy to apply, thereโs no doubt about it. The best use of this method in the real world which I have found is you can generate random groups for participants based on the alphabet.

**Do you have any other method to create random letters?**

Make sure to share your views with me in the comment section, Iโd love to hear from you and please, donโt forget to share this post with your friends, I am sure they will appreciate it.

๐ Excel Formulas

## More Formulas

- Capitalize First Letter
- Concatenate (Combine) Cells with a Comma
- Get File Name
- Get Sheet Name
- Add Leading Zeros in Excel
- Change to Sentence Case in Excel [Formula]
- CONCATENATE a RANGE of Cells [Combine] in Excel
- Concatenate with a Line Break in Excel
- Create a Star Rating Template in Excel
- Separate Names in Excel – (First & Last Name)
- Remove Extra Spaces
- How to Remove First Character from a Cell in Excel
- Change Column to Row

how can we create unique code there is including numbers and alphabetics excluding

A,S,T,M …???????????????

I want my random numbers to only be from ‘A’ to ‘G’ What can I do

What if I want the first few letter to always be the same? Then say three random number and letters

So CHD725KLH, CHD128DHL, CHD631PXY as an example

Hi, Christina,

try this:

=”CHD”&CHAR(RANDBETWEEN(48,57))&CHAR(RANDBETWEEN(48,57))&CHAR(RANDBETWEEN(48,57))&CHAR(RANDBETWEEN(65,90))&CHAR(RANDBETWEEN(65,90))&CHAR(RANDBETWEEN(65,90))

P.S. Thanks, Puneet, for interesting articles. Good job ๐

Hi Christiana,

Try this too

=”CHD”&RANDBETWEEN(100,999)&CHAR(RANDBETWEEN(65,90))&CHAR(RANDBETWEEN(65,90))&CHAR(RANDBETWEEN(65,90))

If I want to generate a series of A’s and B’s but never more than 2 of A or B is it possible?

Didn’t get you properly. Can you come again?

Thank You Sir,

Youโre welcome. ๐

Thanks again Puneet

You’re welcome.

To keep within Windows Rules something a formula like

=CHAR(RANDBETWEEN(65,90))&CHAR(RANDBETWEEN(97,122))&CHAR(RANDBETWEEN(48,57))&CHAR(RANDBETWEEN(33,47))&CHAR(RANDBETWEEN(33,126))&CHAR(RANDBETWEEN(33,126))&CHAR(RANDBETWEEN(33,126))&CHAR(RANDBETWEEN(33,126))&CHAR(RANDBETWEEN(33,126))

would be useful

Thanks for sharing, Andrew.

Interesting piece. Please what if I want to generate 5 alphabets and the result to be in one single cell like “B, E, H, P, G”. Do I have to write the formula above and concatenate/ampersand them or is there a shorter and better means? Thank you

You can use VBA for that. tell me If I can help.

Yes please, I will appreciate

Hello.

May be this is useful for you.

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

Awesome man, thank you !

I so glad you liked it. ๐