LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   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



 
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 01:55 PM.

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"