+ Reply to Thread
Results 1 to 7 of 7

random# btw 1-9 without 6

  1. #1
    Tracker
    Guest

    random# btw 1-9 without 6

    im trying to use rand() or randbetween to get a random number btwn 1 and 9
    but excluding 6 as a posibility. is it possible?

  2. #2
    JE McGimpsey
    Guest

    Re: random# btw 1-9 without 6

    Assuming this is a different question than your other thread (please
    keep questions in the same thread if possible - it reduces the chance
    that people will waste time suggesting answers that have already been
    offered), here's one way, using 2 cells (it's actually the same way, of
    course):

    A1: =RANDBETWEEN(1,8)
    A2: =A1+(A1>=6)



    In article <[email protected]>,
    "Tracker" <[email protected]> wrote:

    > im trying to use rand() or randbetween to get a random number btwn 1 and 9
    > but excluding 6 as a posibility. is it possible?


  3. #3
    Michael
    Guest

    Re: random# btw 1-9 without 6

    Hi Tracker
    Maybe you could also consider this option.
    =IF(RANDBETWEEN(1,9)=6,"",RANDBETWEEN(1,9))

    HTH
    Michael Mitchelson


    "JE McGimpsey" wrote:

    > Assuming this is a different question than your other thread (please
    > keep questions in the same thread if possible - it reduces the chance
    > that people will waste time suggesting answers that have already been
    > offered), here's one way, using 2 cells (it's actually the same way, of
    > course):
    >
    > A1: =RANDBETWEEN(1,8)
    > A2: =A1+(A1>=6)
    >
    >
    >
    > In article <[email protected]>,
    > "Tracker" <[email protected]> wrote:
    >
    > > im trying to use rand() or randbetween to get a random number btwn 1 and 9
    > > but excluding 6 as a posibility. is it possible?

    >


  4. #4
    Ron Coderre
    Guest

    RE: random# btw 1-9 without 6

    Try this:

    =CHOOSE(RANDBETWEEN(1,8),1,2,3,4,5,7,8,9)

    Does that help?
    --
    Regards,
    Ron


    "Tracker" wrote:

    > im trying to use rand() or randbetween to get a random number btwn 1 and 9
    > but excluding 6 as a posibility. is it possible?


  5. #5
    Michael
    Guest

    RE: random# btw 1-9 without 6

    Hey Ron
    That's cool, and I thought I was thinking outside the square !!
    --
    Michael Mitchelson


    "Ron Coderre" wrote:

    > Try this:
    >
    > =CHOOSE(RANDBETWEEN(1,8),1,2,3,4,5,7,8,9)
    >
    > Does that help?
    > --
    > Regards,
    > Ron
    >
    >
    > "Tracker" wrote:
    >
    > > im trying to use rand() or randbetween to get a random number btwn 1 and 9
    > > but excluding 6 as a posibility. is it possible?


  6. #6
    Tracker
    Guest

    Re: random# btw 1-9 without 6

    both of your answers were very helpful.If only i could think like that.Thankyou

    "Michael" wrote:

    > Hi Tracker
    > Maybe you could also consider this option.
    > =IF(RANDBETWEEN(1,9)=6,"",RANDBETWEEN(1,9))
    >
    > HTH
    > Michael Mitchelson
    >
    >
    > "JE McGimpsey" wrote:
    >
    > > Assuming this is a different question than your other thread (please
    > > keep questions in the same thread if possible - it reduces the chance
    > > that people will waste time suggesting answers that have already been
    > > offered), here's one way, using 2 cells (it's actually the same way, of
    > > course):
    > >
    > > A1: =RANDBETWEEN(1,8)
    > > A2: =A1+(A1>=6)
    > >
    > >
    > >
    > > In article <[email protected]>,
    > > "Tracker" <[email protected]> wrote:
    > >
    > > > im trying to use rand() or randbetween to get a random number btwn 1 and 9
    > > > but excluding 6 as a posibility. is it possible?

    > >


  7. #7
    JE McGimpsey
    Guest

    Re: random# btw 1-9 without 6

    Unfortunately, that won't work. The second RANDBETWEEN is independent of
    the first, so if the first one<>6, the second one *could* =6.

    In article <[email protected]>,
    "Michael" <[email protected]> wrote:

    > =IF(RANDBETWEEN(1,9)=6,"",RANDBETWEEN(1,9))


+ 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