次の方法で共有


Formula Watch: Picking random numbers in Excel

If you ever need a random number - say to pick a place for lunch, flip a coin, or select someone for a prize or work duty - you could just enter this handy little function into Excel:

=RANDBETWEEN(1,10)

The above function picks a number between 1 and 10, but you could select any numbers you want. For a virtual coin toss, you could use:

=RANDBETWEEN(1,2)

If you want to run it again to pick another number, select the cell, click inside the Insert Function box at the top of your worksheet, and hit Enter. Just be aware that doing so will cause any other random functions in that same sheet to run again as well.

Suzanne

Comments

  • Anonymous
    October 30, 2010
    I'm running Excel 2003 and found that if I want to re-run the formulas again, all I need to do is select any empty cell and hit my delete key. Even though the cell is empty and I'm not deleting any data, hitting the delete key will run them all again.