Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Random number selection | Excel Worksheet Functions | |||
Random Selection | New Users to Excel | |||
Random question / data selection | Excel Worksheet Functions | |||
Random Selection | Excel Worksheet Functions | |||
How can I set up the random selection of a cell from within a ran. | Excel Discussion (Misc queries) |