Assign Random Characters to Cells In Excel

In this pose we will see how could we generate random characters in excel and assign random characters to cells in excel.

Below is the pic which shows an excel range that has been assigned random characters.

excel range filled with random characters

As you could see the range A1:C5 is filled with random characters/alphabets.

To generate random characters in excel, we will use excel formula RANDBETWEEN and CHAR.

RANDBETWEEN function returns a random number between the limit specified in the formula.

CHAR function returns the character equivalent of a number in excel.

Step 1

Select the range which you want to fill with random characters; I have selected the range A1:C5 here.

formula range to assign cells with random characters

Step 2

Press F2 to enter the formula =CHAR(RANDBETWEEN(65,90)) in cell A1 and press Ctrl+Enter simultaneously to write the formula in the entire selected range as shown below.

excel formula to generate random characters

In excel the character code of letter A is 65 and character code of Z is 90 that’s why we have used 65 and 90 so that the letter generated is between A and Z .

Please note that these integer numbers are for capital letters A-Z, should you need to assign small letter alphabets to excel cells, use formula =CHAR(RANDBETWEEN(97,122)) as 97 represents letter a and 122 represents z

After hitting Ctrl+enter, the formula will be written to all the cells as shown below.

excel range populated with random characters

Step 3

Now copy the range and paste special as values as shown below, cause the value will keep changing at every event as excel will keep generating different random numbers each time an event takes place in excel and hence different set of characters in the cells.

paste special range filled with random characters

paste special values excel range filled with random characters

Hit OK after selecting Values in the paste special menu.

Hope this helped.


Share The Knowledge

Random Posts

Leave a Reply