Solved

Randomise in excel

Posted on 2013-05-25
2
146 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
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 in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

828 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