How to generate random strings in Excel ?

In one of the previous blog posts , we demonstrated how you can use the function RANDBETWEEN in Microsoft Excel to generate random number in Excel. In this blog post, let’s have a look at generating random strings in Excel.

How to generate random strings in Excel ?

You can use the combination of the CHAR function and the RANDBETWEEN function to generate the random letter. For example  =CHAR(RANDBETWEEN(65,90)) would generate the random character. The values 65 and 90 represent the ASCII values for the letters A and Z respectively.

Incase you need a string with 3 characters , the formula would be like this.

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

image

If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.

Leave a Reply


x

Interesting BlogPosts to read

How to quickly remove multiple line breaks in Excel using VBA code?
There are times when you might copy few data from different source and you would end up getting unne...
How to change orientation of the worksheets in Microsoft Excel ?
This blog post will show the steps that are needed to change the orientation of the current workshee...
How to hide page breaks in worksheets in Microsoft Excel ?
When the page breaks is used to adjust the print area in a worksheet in excel , this would show up a...