How to randomly fill values from a list of data in Excel?
Randomly selecting values from a predefined list in Excel is a common task with applications in data analysis, simulations, testing scenarios, and more. This comprehensive guide will walk you through multiple methods to accomplish this, from basic techniques to advanced optimized solutions.
Randomly fill values from a list of data with formulas
- INDEX + RANDBETWEEN functions (All versions)
- RANDARRAY + INDEX functions (Excel 365, Excel 2021 and later version)
Randomly select and fill values from a list of data with Kutools for Excel (All versions)
Randomly fill values from a list of data with formulas
In this section, we’ll walk you through multiple formula-based methods to randomly fill values from a list.
✅ Formula 1: INDEX + RANDBETWEEN functions
This is a classic and universally supported method to randomly pick values from a given list.
Please copy or enter the following formula into a blank cell, then, drag it down to fill as many rows as needed.
=INDEX($A$2:$A$15, RANDBETWEEN(1, COUNTA($A$2:$A$15)))
- A2:A15: This is the list of values you want to randomly pick from.
- COUNTA($A$2:$A$15): Counts the total number of items in the list.
- RANDBETWEEN(1, n): Randomly generates a number between 1 and n, where n is the list length.
- INDEX(range, number): Fetches the value at the number-th position in the list.
✅ Formula 2: INDEX + RANDARRAY functions (Excel 365 / 2021+)
This method is more efficient and supports dynamic arrays, allowing batch generation of random selections.
Simply enter the following formula into a blank cell and press Enter — five random values will automatically spill into the rows below. See screenshot:
=INDEX(A2:A15, RANDARRAY(5, 1, 1, COUNTA(A2:A15), TRUE))
- A2:A15: This is the list of values you want to randomly pick from.
- COUNTA(A2:A15): Counts how many non-empty cells are in the list.
- RANDARRAY(5, 1, 1, COUNTA(...), TRUE): Generates an array of 5 random integers (1 column), each between 1 and the total number of items in the list.
- INDEX(A2:A15, …): Returns the items from the list based on the randomly generated positions.
Randomly select and fill values from a list of data with Kutools for Excel (All versions)
Kutools for Excel offers a super simple, no-formula-needed solution for picking cells with random values from a list, allowing users to quickly populate ranges with randomized entries through an intuitive interface.
After installing Kutools for Excel, please do as this:
- Select the source range where you want to pick random values.
- Click Kutools > Range > Sort / Select Range Randomly, see screenshot:
- In the Sort / Select Range Randomly dialog box, under the Select tab, do the following options:
- Enter the number of cells you want to randomly select;
- Then, check Select random cells option from the Select Types section;
- At last, click OK button.
- The specified number of cells will be randomly selected from your chosen range. You can then copy and paste these values to other locations as needed.
🔚Conclusion
Randomly filling values from a predefined list in Excel can be easily achieved using built-in formulas or enhanced with third-party tools like Kutools.
- For all Excel versions, the combination of INDEX and RANDBETWEEN provides a reliable method to generate random selections.
- For users of Excel 365 or Excel 2021, the RANDARRAY + INDEX approach offers a more dynamic and scalable solution.
- If you prefer a no-formula, user-friendly alternative, Kutools for Excel delivers a powerful and intuitive way to randomly pick values without writing any formulas — making it ideal for users at all skill levels.
Choose the method that best fits your needs and workflow. If you're interested in exploring more Excel tips and tricks, our website offers thousands of tutorials to help you master Excel.
Related articles:
Randomly select cells based on criteria in Excel
Randomly add background/fill color for cells in Excel
Best Office Productivity Tools
Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time. Click Here to Get The Feature You Need The Most...
Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier
- Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
- Open and create multiple documents in new tabs of the same window, rather than in new windows.
- Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!