Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Random Selection based on Difficulty

So, I have been playing around with =rand() and thought it would be
fun to create a menu for us for dinner since neither my wife nor I can
decide what to eat.

What I would like to do is have a list of items we can make:

A1:A25 items like pancakes (yes we eat them for dinner sometimes)
spagehtti, Enchiladas, Tacos, etc

Then in B1:B25 rate each easy, medium or hard

finally in a cell (it does not matter which one) have a pick list of
Easy, Medium, or Hard then have it randomly generate a selection from
the list based on difficulty.

Any ideas?

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,624
Default Random Selection based on Difficulty

Perhaps a different layout:

http://www.contextures.com/xlDataVal02.html

In article . com,
" wrote:

So, I have been playing around with =rand() and thought it would be
fun to create a menu for us for dinner since neither my wife nor I can
decide what to eat.

What I would like to do is have a list of items we can make:

A1:A25 items like pancakes (yes we eat them for dinner sometimes)
spagehtti, Enchiladas, Tacos, etc

Then in B1:B25 rate each easy, medium or hard

finally in a cell (it does not matter which one) have a pick list of
Easy, Medium, or Hard then have it randomly generate a selection from
the list based on difficulty.

Any ideas?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,572
Default Random Selection based on Difficulty

Let's say you make *3 lists*, and label them "Hard", "Medium" and "Easy".

Let's put them in an out-of-the-way location on your WS, say columns X, Y,
and Z.

Label them as:
X1= Hard
Y1 = Medium
Z1 = Easy

Lets say you have 4 Hard dishes, entered in X2 to X5,
And 9 Medium dishes, entered in Y2 to Y10,
And finally 6 Easy dishes, from Z2 to Z7.

To keep the formulas a little shorter, lets name each range appropriately.

Select X2 to X5,
Click in the "Name Box" (left of the formula bar),
Type in "hard" (no quotes), and hit <Enter.

Do the same for the other 2 ranges, naming them, of course, medium and easy.


Now, in W1 enter this formula:

=Rand()

And drag down to copy as many rows as the maximum number of dishes, which in
this case is 9.
It really doesn't matter if you copy to *more* rows then necessary, just
*don't* copy to *less*!

NOW ... in A1, B1, and C1, again enter:
A1= Hard
B1 = Medium
C1 = Easy

Enter this formula in A2:
=INDEX(hard,RANK(W1,W1:INDEX(W:W,COUNTA(hard))))

Enter this in B2:
=INDEX(medium,RANK(W1,W1:INDEX(W:W,COUNTA(medium)) ))


And finally, enter this in C2:
=INDEX(easy,RANK(W1,W1:INDEX(W:W,COUNTA(easy))))

Now, every time you hit <F9, you'll get a random selection from each of
your lists in the appropriate column.

--

HTH,

RD
================================================== ===
Please keep all correspondence within the Group, so all may benefit!
================================================== ===

wrote in message
ups.com...
So, I have been playing around with =rand() and thought it would be
fun to create a menu for us for dinner since neither my wife nor I can
decide what to eat.

What I would like to do is have a list of items we can make:

A1:A25 items like pancakes (yes we eat them for dinner sometimes)
spagehtti, Enchiladas, Tacos, etc

Then in B1:B25 rate each easy, medium or hard

finally in a cell (it does not matter which one) have a pick list of
Easy, Medium, or Hard then have it randomly generate a selection from
the list based on difficulty.

Any ideas?


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Random Selection based on Difficulty

RagDyeR -

Thank you very much go it to work in Excel - however when I attempt to
put it in googlespreadsheets I get the following error:

#NAME? Unknown range name D1


D=W in your example

Anyway - thank you very much for the help!!


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,572
Default Random Selection based on Difficulty

Sorry!
Don't know anything about Google spreadsheets to offer any advice.

Appreciate your feed-back.
--
Regards,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
wrote in message
oups.com...
RagDyeR -

Thank you very much go it to work in Excel - however when I attempt to
put it in googlespreadsheets I get the following error:

#NAME? Unknown range name D1


D=W in your example

Anyway - thank you very much for the help!!





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
Random number selection kwidener Excel Worksheet Functions 5 September 5th 06 04:04 PM
Random Selection Cookie New Users to Excel 2 May 3rd 06 12:05 AM
Random question / data selection hank bulger Excel Worksheet Functions 2 December 6th 05 12:11 AM
Random Selection Cris Excel Worksheet Functions 2 October 16th 05 06:15 PM
How can I set up the random selection of a cell from within a ran. nybbac Excel Discussion (Misc queries) 5 January 1st 05 05:39 AM


All times are GMT +1. The time now is 09:31 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"