+ Reply to Thread
Results 1 to 6 of 6

pick random cells ?

  1. #1
    Registered User
    Join Date
    08-27-2007
    Posts
    20

    pick random cells ?

    I got a question for you masters..

    Cloumn: K L M
    1 me you any
    -----------------------------
    2 a b c
    2 d e f
    3 t u i

    okay here is my question

    I want to randomly pick K1 to M1
    and if I got K1 then randomly pick K2 to K3
    and so on....
    if this was confusing.... check http://home.online.no/~to-tho/Heroes5/strike.xls

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    You probably need to change a couple of your current formulas. As it stands F12 can only be "Academy" when the rand() value chosen in K12 is exactly zero, which is very unlikely.

    Presumably you want an equal chance of each K1:R1 value selected so change K12 to

    =RAND()*8

    change L12 to

    =INT(K12)+1

    [these could be combined in 1 cell as =INT(RAND()*8)+1]

    then in F12

    =INDEX($K$1:$R$1,L12)

    and in G12 to select, randomly, entry 2 or 3 from the same column

    =INDEX($K$2:$R$3,INT(RAND()*2+1),MATCH(F12,$K$1:$R$1,0))
    Last edited by daddylonglegs; 11-02-2008 at 10:23 AM.

  3. #3
    Registered User
    Join Date
    08-27-2007
    Posts
    20
    ty for your quick reply
    I feel I'm close now thanx to you....
    but when I add your formulas I get an "name" value.... where I should get the "letter" value.... why??

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    I attach your worksheet with the updated formulas....
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    08-27-2007
    Posts
    20
    ty alot!!!!!

  6. #6
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    No problem....

    Thinking about it, I suppose there's no need for MATCH function, you can replace MATCH(F12,$K$1:$R$1,0) in G12 with just L12

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1