Use RAND or RANDBETWEEN Functions to generate test data

 

Use RAND or RANDBETWEEN Functions to generate test data

When you create an Excel model or template, the best way is to use the actual data to test if your model is working. But if you don’t have the actual data, you can manually type in some faked data. However, the process is surely tedious. An easy and quick way is to use the RAND or RANDBETWEEN functions to generate test data without the boring typing.

The RAND function has no argument. All you need is to type in the formula =RAND(). You don’t need to put in anything within the parenthesis. It generates random number from 0 to 1. If you want a bigger number, you can multiply the random by a constant. For example, you can type in =RAND() * 5000 and a random number will be generated from 0 to 5000.

The RANDBETWEEN function is handy when you have a range of data in mind and you don’t need to mess with a formula that multiplies a constant. All you need is enter a formula like this: =RANDBETWEEN(1,5000) and a random number will be generated from 1 to 5000.

Let see the below example. I create an Excel Spreadsheet to analyze state data. Afterwards, I want to create some faked data for testing purposes. So I put in the =RANDBETWEEN(1,5000) in the first cell with data (D2). Then I copy the formula down to the last data cell. Voila! I got some good faked data for testing.

Please be reminded that the data will change every time you press the “ENTER” key. If you want to freeze the data, you can copy the data range, then paste special – value to freeze the data.

All data in this website are generated by using these 2 random functions. There are no real life actual data.

File to download: None

Related article: Lottery Numbers Generator

random logo
msofficeshare logo
pic1 random numbers

More Posts

Excel Vlookup Function

The VLOOKUP function in Excel is a powerful tool that allows you to search for a specific value in a table and return a corresponding