Excel TV ExcelTV

Creating Random Data in Excel using RANDBETWEEN and CHOOSE

Updated
Creating Random Data in Excel using RANDBETWEEN and CHOOSE

Many times we are in need of random data. Suppose, if you are doing some tutorial on Excel formulas, then we need to have random data in your Excel sheet. There are many situations in the same way and when we are in need of some random data, we generally use some websites that helps in random data generation.

Steps to generate random data using RANDBETWEEN and CHOOSE

As I told earlier, we can generate random data in Excel without use of any website. Two formulas RANDBETWEEN and CHOOSE helps us for random data generation. We will see how we could do that easily. Combination of RANDBETWEEN and CHOOSE functions in Excel, could generate random data as you want.

 1 – Using RANDBETWEEN (bottom, top)

RANDBETWEEN function helps you to generate random data between the bottom and top arguments. ‘bottom’ parameter specifies the minimum value and ‘top’ parameter specifies the maximum value. For example, if we want to fill the cell with the any value in between ‘1’ and ‘3’, then we need to use RANDBETWEEN (1, 3) in the formula bar and hit enter. This can be used, if you want to generate some long integer values as IDs right in your Excel without the need of any websites. This generates the value between ‘1’ and ‘3’ as shown below,

2 – Using CHOOSE ()

CHOOSE is really an awesome function and when used with RANDBETWEEN, we could get to know the real use of it. General syntax of CHOOSE is CHOOSE (index_num, value1, [value2], …)

Here,

Index_num is required and specifies which value argument is selected.

Value1, Value 2 , … specifies the values to be returned based on the provided index_num. Suppose, if you give CHOOSE (2,”ONE”,”TWO”,”THREE”), then this returns “TWO”. It is similar to fetching out the value from the array based on the index provided.

See below to understand the use of CHOOSE along with RANDBETWEEN,

 What’s next?

Isn’t this awesome? This really saves you much time to generate random data and that too in the way you want. This again proves that Excel can be used to do anything we want. If you have anything to add, please do share with us through comments. Start using RANDBETWEEN and CHOOSE in Excel.

Written by

Sridhar Belide
Sridhar BelideB.Tech. Computer Science, JNTUH10+ years in software engineering

Software Engineer, Wells Fargo

  • React
  • UI Frameworks
  • Front-end Development
Sridhar Belide is a skilled software engineer with over a decade of experience in the industry. Currently working at Wells Fargo since December 2018, he focuses on developing UI frameworks for front-end applications using React. Before joining Wells Fargo, Sridhar spent five years and four months at Tata Consultancy Services, where he held the position of IT Analyst. He also has experience as a Community Manager for Impact SoftTech Pvt. Ltd. EALP and as a Software Research and Development Engineer at NSN - Nokia Solutions and Networks. Sridhar holds a Bachelor of Technology (B.Tech.) in Computer Science from JNTUH, demonstrating his strong foundation in the field.

Read more articles by Sridhar Belide

Editorial standards

Fact Checking & Editorial Guidelines

Every article on Excel TV is held to a published editorial standard. The goal: accurate, current, and useful — without filler.

  1. Expert review. Drafts on technical Excel topics are reviewed by a contributor with hands-on, working knowledge of the feature being covered.
  2. Source validation. Claims about Excel behavior are tested in current Microsoft 365 builds. Third-party product claims are sourced from the vendor's own documentation.
  3. Disclosure. Affiliate links, sponsorships, and any commercial relationships that influenced a piece are disclosed in-line and at the foot of the article.
  4. Updates. Articles are revisited when Microsoft ships changes that affect the content. The most recent revision date is shown on every post.

Spot a problem? Email editor@excel.tv and we will look at it.

Subject-matter review

Reviewed by Subject Matter Experts

Technical Excel articles are reviewed by contributors with verifiable, hands-on experience in the topic — not generalist editors.

  • Qualified reviewers. Reviewers include Microsoft Excel MVPs, working business-intelligence practitioners, and Excel TV editorial staff. See each author's page for credentials.
  • Current to a known Excel build. Procedural articles state which Excel version they were validated against. Where Microsoft has since changed behavior, the article carries an inline update note.
  • Clarity check. Reviewers verify steps are reproducible by a reader at the assumed skill level — not just technically correct in a vacuum.

Want to contribute or review for Excel TV? See the about page.

Comments (1)

Historical comments preserved from the WordPress archive. Commenting is no longer active.

  1. Saul

    As choose and randbetween naturally give a fairly even spread of results, is there any way to control whether one option appears more than others?