Solved

Randomise in excel

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
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…
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
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.

734 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