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

  • Check If A Cell Has An Error In Excel

    No matter how much we hate errors they seem to be inevitable.Sometimes dynamically we are required to check the cells if […]

    Share The Knowledge
  • Change Font Color Of Comments In Excel

    If  you are a sport to have a different and not the typical font color for the comment in you […]

    Share The Knowledge
  • Delete Every Column Except Some Column In Excel

    loop through excel columns and delete all but keep some, delete all columns in excel except some, excel vba to loop and delete some columns, delete some columns in excel while keeping some columns

    Share The Knowledge
  • Remove Quotes In Excel

    Generally it is observed that we get some embedded quotes or quotation marks in our data specially if it is […]

    Share The Knowledge

Leave a Reply