+ Reply to Thread
Results 1 to 7 of 7

Randbetween

  1. #1
    Registered User
    Join Date
    08-28-2003
    Posts
    32

    Randbetween

    I would like to generate an integer that is either between 1 and 100 or 200 and 300. Thank you in advance for your assistance.

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Randbetween

    Try

    =CHOOSE(RANDBETWEEN(1,2),RANDBETWEEN(1,100),RANDBETWEEN(200,300))
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Randbetween

    hi ASPENCO. wow a maiden post after 10 years! an alternative:
    =CHOOSE(RANDBETWEEN(1,4),1,100,200,300)

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  4. #4
    Registered User
    Join Date
    08-28-2003
    Posts
    32

    Re: Randbetween

    Thank you that seemed to work perfectly.

  5. #5
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Randbetween

    @ Benishiryo

    =CHOOSE(RANDBETWEEN(1,4),1,100,200,300)

    gives either 1,100,200 or 300

    Am I missing something?

  6. #6
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Randbetween

    @ Ace_XL:
    oops you're right. i thought OP wanted random figures between the 4 numbers.

    @ASPENCO:
    please mark thread as "Solved" if the solution solved the problem

  7. #7
    Forum Expert Debraj Roy's Avatar
    Join Date
    09-27-2012
    Location
    New Delhi,India
    MS-Off Ver
    Excel 2013
    Posts
    1,469

    Re: Randbetween

    Hi ASPENCO..

    In addition.. please also mention if you have cross-posted.. and also inform the same in all other areas..

    http://chandoo.org/forums/topic/randbetween

    Its a bad manner to cross-post without giving URL..
    Last edited by Debraj Roy; 07-03-2013 at 02:03 AM. Reason: Sorry! benishiryo :(
    Regards!
    =DEC2HEX(3563)

    If you like someone's answer, click the star to give them a reputation point for that answer...

+ 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