+ Reply to Thread
Results 1 to 7 of 7

Random numbers

  1. #1
    Raj Mazumdar
    Guest

    Random numbers

    Hi there

    This is for a little fun... we are playing a small in-house lottery game
    ourselves. Is there a way to generate 6 random numbers in the series from 1
    through 49, using excel? They could either be in a single cell, separated by
    commas or... separately in six adjacent cells in a row.

    Thanks

    Raj

  2. #2
    Govind
    Guest

    Re: Random numbers

    Hi,

    Use

    =RANDBETWEEN(1,49)

    in a cell and and copy this formula to 5 adjacent cells.

    Regards

    Govind.

    Raj Mazumdar wrote:
    > Hi there
    >
    > This is for a little fun... we are playing a small in-house lottery game
    > ourselves. Is there a way to generate 6 random numbers in the series from 1
    > through 49, using excel? They could either be in a single cell, separated by
    > commas or... separately in six adjacent cells in a row.
    >
    > Thanks
    >
    > Raj


  3. #3
    Raj Mazumdar
    Guest

    Re: Random numbers

    Tried that... it's only giving #NAME? as output...


    "Govind" wrote:

    > Hi,
    >
    > Use
    >
    > =RANDBETWEEN(1,49)
    >
    > in a cell and and copy this formula to 5 adjacent cells.
    >
    > Regards
    >
    > Govind.
    >
    > Raj Mazumdar wrote:
    > > Hi there
    > >
    > > This is for a little fun... we are playing a small in-house lottery game
    > > ourselves. Is there a way to generate 6 random numbers in the series from 1
    > > through 49, using excel? They could either be in a single cell, separated by
    > > commas or... separately in six adjacent cells in a row.
    > >
    > > Thanks
    > >
    > > Raj

    >


  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    To get 6 unique numbers between 1 and 49....

    put this formula in A1 and copy across row to AW1

    =RAND()

    in A2 put this formula

    =RANK(A1,$A1:$AW1)

    and copy across to F2

    A2:F2 now gives your 6 random numbers

    hide row 1 if you wish

  5. #5
    Govind
    Guest

    Re: Random numbers

    Hi,

    You need to have the Analysis Toolpak add-in enabled to use this formula.

    Go to Tools-AddIns and enable 'Analysis Toolpak' and then try the formula.

    Regards

    Govind.

    Raj Mazumdar wrote:
    > Tried that... it's only giving #NAME? as output...
    >
    >
    > "Govind" wrote:
    >
    >
    >>Hi,
    >>
    >>Use
    >>
    >>=RANDBETWEEN(1,49)
    >>
    >>in a cell and and copy this formula to 5 adjacent cells.
    >>
    >>Regards
    >>
    >>Govind.
    >>
    >>Raj Mazumdar wrote:
    >>
    >>>Hi there
    >>>
    >>>This is for a little fun... we are playing a small in-house lottery game
    >>>ourselves. Is there a way to generate 6 random numbers in the series from 1
    >>>through 49, using excel? They could either be in a single cell, separated by
    >>>commas or... separately in six adjacent cells in a row.
    >>>
    >>>Thanks
    >>>
    >>>Raj

    >>


  6. #6
    Raj Mazumdar
    Guest

    RE: Random numbers

    Thanks guys, both work...

    "Raj Mazumdar" wrote:

    > Hi there
    >
    > This is for a little fun... we are playing a small in-house lottery game
    > ourselves. Is there a way to generate 6 random numbers in the series from 1
    > through 49, using excel? They could either be in a single cell, separated by
    > commas or... separately in six adjacent cells in a row.
    >
    > Thanks
    >
    > Raj


  7. #7

    Re: Random numbers

    Hi Raj,

    If your 6 numbers should be non-repeating (=unique) then I suggest to
    take my UDF UniqRandInt() from www.sulprobil.com

    HTH,
    Bernd


+ 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