Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
hank bulger
 
Posts: n/a
Default Random question / data selection


I need to create a formula or function that when selected, automatically
selects a random set of questions from a master list. Is this possible
in Excel? Any suggestions?:


--
hank bulger
------------------------------------------------------------------------
hank bulger's Profile: http://www.excelforum.com/member.php...o&userid=29379
View this thread: http://www.excelforum.com/showthread...hreadid=490923

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
rsenn
 
Posts: n/a
Default Random question / data selection


Hank, This might help.

For this example I'll assume that you have a list 50 questions and want
to select 10 of them. These numbers, 50 and 10, aren't critical.

Further assume column A has a heading in cell A1, and numbers 1 thru 50
in cells A2 through A51. These correspond to the 50 questions.

In column B, cells B2 through B51, enter the formula =RAND() to get 50
random numbers.

In cell C2 enter the formula =B2=LARGE(B:B,10), and copy it down to
cell C51.

You should get 10 TRUE values. Select those questions.


--
rsenn
------------------------------------------------------------------------
rsenn's Profile: http://www.excelforum.com/member.php...o&userid=29050
View this thread: http://www.excelforum.com/showthread...hreadid=490923

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Conrad Carlberg
 
Posts: n/a
Default Random question / data selection

Hi Hank,

One way (and there's probably a more elegant solution):

Suppose you have five questions in your master list and want to select a
random three. In A1:A5, enter:

=RAND()

In B1:B5, enter:

=SMALL($A$1:$A$5,ROW())

In C1:C5, enter the numbers 1 through 5, or however you prefer to uniquely
identify each question in your master list.

In D1, enter:

=VLOOKUP(A1,$B$1:$C$5,2,0)

and copy/paste it down through D2:D3. Now, whenever you press F9 (or make
some data change to your worksheet), RAND() recalcs, as do SMALL and
VLOOKUP, and you'll get a different three question numbers.

Obviously, you can extend this to as many rows in columns A, B and C as you
have questions in your master list, and as many rows in column D as you want
to sample from that list.

If you want to put these formulas in rows other than those beginning with
Row 1, you'll need to make adjustments to the ROW argument to SMALL.

--
C^2
Conrad Carlberg

Excel Sales Forecasting for Dummies, Wiley, 2005


"hank bulger"
wrote in message
...

I need to create a formula or function that when selected, automatically
selects a random set of questions from a master list. Is this possible
in Excel? Any suggestions?:


--
hank bulger
------------------------------------------------------------------------
hank bulger's Profile:

http://www.excelforum.com/member.php...o&userid=29379
View this thread: http://www.excelforum.com/showthread...hreadid=490923



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Another Data Validation question Nigel Excel Discussion (Misc queries) 3 October 14th 05 10:37 PM
Help PLEASE! Not sure what answer is: Match? Index? Other? baz Excel Worksheet Functions 7 September 3rd 05 03:47 PM
Linest function: data selection problems NathanG Excel Worksheet Functions 1 August 26th 05 04:12 PM
Another Exciting Data Table Question!!!! xinekite Charts and Charting in Excel 1 May 29th 05 01:22 PM
Question about combining data from multiple workbooks into one rep BookOpenandUpright Excel Discussion (Misc queries) 2 February 19th 05 12:37 PM


All times are GMT +1. The time now is 06:59 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"