Results 1 to 3 of 3
  1. #1
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Collect a random value from a table! (Excel 2000)

    Hi guys,
    I have yet another question. I'm playing around with randomising values and I need some further guidance here.

    In the sample file, I have created a function to randomly pick out a company name. Could I chance my arm and ask if you could help set up a function to randomly pick out ANY value from the table...not just a company name?!

    PS: The function uses RANDBETWEEN. You must ensure that the Analysis Toolpak is activated in TOOLS | AddIns.

    TIA
    Regards,
    Rudi

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Collect a random value from a table! (Excel 2000)

    =INDEX($B:$F,RANDBETWEEN(1,COUNTA($B:$[img]/forums/images/smilies/cool.gif[/img]),RANDBETWEEN(1,COUNTA(B1:F1)))

  3. #3
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Collect a random value from a table! (Excel 2000)

    <img src=/S/thumbup.gif border=0 alt=thumbup width=15 height=15>
    In retrospect I should have played around with it more. I got this formula from a datafile I had. If I played with it more, I could have noticed that index had a column argument too.

    Thx for the input Hans!
    Cheers
    Regards,
    Rudi

Posting Permissions

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