Solved

Randomise in excel

Posted on 2013-05-25
2
120 Views
Last Modified: 2013-05-30
Hi

I am trying to generate some test data for a customer survey that I am building.

The customer can enter one of the following responses -

Excellent
Very Good
Satisfactory
Very Poor
Unacceptable

I want to generate some data for 1921 rows. I want excel to select any one of those entries at random. At the moment I can only randomize the order or the response and not the selection.

Can anyone help me?
0
Comment
Question by:mr_bungle89
2 Comments
 
LVL 23

Expert Comment

by:Eirman
ID: 39197110
I'm somewhat confused ... What's the difference between "response" and "Selection" ?
0
 
LVL 14

Accepted Solution

by:
Faustulus earned 500 total points
ID: 39197155
You may like to try this formula:
=LOOKUP(RANDBETWEEN(1,5),{1,2,3,4,5},$A$4:$A$8)

Open in new window

The range A4:A8 holds the five responses. You can move them elsewhere, anywhere in the workbook, and adjust the referenced range in the formula. You can also use a named range. It would make sense to use the same range that holds the list for your drop-down from which the user selects his response. In that case you can enter the formula in the same field the user  can later over-write to enter his own response.
The RANDBETWEEN() function will re-calculate every time the sheet re-calculates. Also, the formula will be lost if the user makes a selection. So, presuming that you have the formula in all of your 1921 cells and the user makes a selection in the first of them, ALL 1921 cells will change. However, the formula will be lost only in the first cell, and that cell won't therefore be able to change again on future re-calculations.
If this behavior isn't acceptable you can Copy/Paste special => Values to replace the formula with hard values.
I hope this will be useful to you.
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Drop Down List with Unique/Distinct Values (Part II - ComboBox or ListBox and Data Validation List Bonus!) David Miller (dlmille) Intro This article focuses on delivering unique, sorted lists to list objects (e.g., ComboBox, ListBox) and Dat…
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now