Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Randomise in excel

Posted on 2013-05-25
2
Medium Priority
?
164 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 24

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 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

705 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