Random String Generator In Excel

Let’s understand how to generate random string in excel.

We will see how to generate random strings in excel with the help of RANDBETWEEN and CHAR function in excel.

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

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

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

Step 1

Select the range which you want to fill with random string.


Step 2

Press F2 to enter the formula =CHAR(RANDBETWEEN(65,90))&CHAR(RANDBETWEEN(65,90))& CHAR(RANDBETWEEN(65,90))&CHAR(RANDBETWEEN(65,90))

We will generate random string of the length 4 that’s why I have concatenated the formula 4 times, if we wanted to have string of length 7 we would repeat the formula 7 times with concatenation operator “&” between them.


Step 3

Press Ctrl+Enter to populate the formula in the selected range.


Step 4

Now copy the range and paste special as values as shown below.



Hope this helped.

Share The Knowledge

Random Posts

  • Delete Row Based On A Substring In Excel

    delete row in excel based on some string, excel delete rows based on substring, delete data in excel based on certain string, excel delete rows if the cell has certain string

    Share The Knowledge
  • Create Rows From Comma Separated Cell Values In Excel

    create rows from comma separated values .in excel, split comma separated values and create rows from each value in excel, break comma separated string in a cell into rows, create rows from comma separated text string in excel

    Share The Knowledge
  • Extract Name From Email Address In Excel

    Let’s see how to extract the name from the email addresses given. Generally the email addresses are of the form […]

    Share The Knowledge
  • How To Add Calculated Field In Pivot Table

    We will understand about the calculated field in a pivot table in excel. Calculated field is an additional field that is […]

    Share The Knowledge

Leave a Reply