RANDBETWEEN: Google Sheets formulas explained

Are you tired of manually creating random numbers for your spreadsheets? Fear not because Google Sheets has a solution - the RANDBETWEEN function. As a marketer, I find this function extremely useful when I need to generate randomized data for testing or simulations.

If you're new to using Google Sheets formulas, don't worry. It may seem daunting at first, but trust me, it's worth the effort to learn. And RANDBETWEEN is a great formula to start with.

The basics of RANDBETWEEN

RANDBETWEEN is a simple function that generates a random integer between a specified range. For example, the following formula generates a random number between 1 and 10:


Each time the spreadsheet recalculates, a new random value is generated. Pretty cool, right?

Using RANDBETWEEN for marketing purposes

One use case for RANDBETWEEN in marketing is split testing. Let's say you want to test two versions of an email subject line to see which one performs better. You can use RANDBETWEEN to assign a random sample of your email list to each variant.

Here's how you can do it:

  1. Create a column with a RANDBETWEEN formula that generates a number between 1 and 100 for each row.
  2. Filter the column to show only rows where the RANDBETWEEN generated number is less than or equal to 50 (for example).
  3. Cut and paste these rows into a new sheet as Variant A.
  4. Filter the column to show only rows where the RANDBETWEEN generated number is greater than 50.
  5. Cut and paste these rows into a new sheet as Variant B.
  6. Send each variant to their respective group and track the results.

Using RANDBETWEEN this way ensures that the two groups are statistically similar, and any difference in performance can confidently be attributed to the subject line.

Advanced RANDBETWEEN: Generating random strings

But what about generating random strings, like passwords or usernames? Luckily, RANDBETWEEN can help us with that too.

We can use the CHAR function to convert a number into its corresponding character for letters and symbols. For example, CHAR(65) is "A", and CHAR(97) is "a".

So, to generate a random string of letters, we can combine RANDBETWEEN with CHAR like this:


This formula generates three uppercase letters. You can adjust the number of letters by changing the number of concatenated CHAR functions.

You can also include lowercase letters (97-122), numbers (48-57), and symbols (33-47, 58-64, 91-96, 123-126) by adding more CHAR functions and adjusting the RANDBETWEEN ranges accordingly.

Closing thoughts

RANDBETWEEN is a versatile and easy-to-use formula that comes in handy for all sorts of tasks. And we've only scratched the surface of what it's capable of.

Learning Google Sheets formulas may seem intimidating, but it's worth investing the time and effort to become proficient. It can save you countless hours of manual work and open up new possibilities in your marketing strategies.

So why not give RANDBETWEEN a try?

By clicking “Accept”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. View our Privacy Policy for more information.