eHow launches Android app: Get the best of eHow on the go.

How To

How to Generate a Random Number Using a Computer

Member
By Julie Stiles Mills
User-Submitted Article
(0 Ratings)
Generate a Random Number Using a Computer
Generate a Random Number Using a Computer

Hosting a drawing or contest and need to select a random winner?

Rolling dice, flipping coins, drawing cards or straws, drawing slips of paper out of a hat. All methods to generate random results. Here's one more:

@randbetween

Difficulty: Easy
Instructions

Things You'll Need:

  • A Computer, A spreadsheet program, like Excel or Quattro Pro
  1. Step 1
     

    To Create a Random Number:

    In a blank cell of any spreadsheet program, type

    @randbetween(x,y)

    where "x" equals the smallest number you want to use and "y" equals the largest.

    For example, typing:

    @randbetween(1,100)

    will generate a number between 1 and 100.

  2. Step 2

    To Recalculate: Press the "F9" key to generate a new number.

  3. Step 3

    Change a Random Number to a Value: Note that ANY time you make a change to ANY cell in your spreadsheet, the program recalculates ALL the formulas on the sheet.

    That means the random number will recalculate every time a change is made to the spreadsheet. If you want to make your random value permanent, move to the cell with your @RANDBETWEEN function and press F2 (EDIT), then F9 (CALC).

  4. Step 4

    Compatibility: This formula will work in Excel, Quattro Pro and Lotus 123. Have a different spreadsheet program? Give it a shot.

Tips & Warnings
  • Microsoft Purists: Some of you may be thinking that Excel formulas begin with an equal sign, so the formula should be: "=randbetween(1,100)" True enough. Go ahead. But old time spreadsheet users, like me, know that spreadsheet formulas originally began with "@" and we also know that formulas beginning with an equal sign won't work in Quattro Pro and Lotus. Because Microsoft is special.
Subscribe

Post a Comment

Post a Comment

Related Ads

  • Have you done this? Click here to let us know.
I Did This
Get Free Computers Newsletters

Copyright © 1999-2009 eHow, Inc. Use of this web site constitutes acceptance of the eHow Terms of Use and Privacy Policy.   en-US Portions of this page are modifications based on work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License.

eHow Computers
eHow_eHow Technology and Electronics