Microsoft Office Tutorials and References
In Depth Information
Precise randomness with RANDBETWEEN
Using the RAND function returns a value between 0 and 1, and when used
with other functions, such as ROUND, you can get a random number within
a range that you specify. If you just need a quick way to get an integer (no
decimal portion!) within a given range, use RANDBETWEEN.
The RANDBETWEEN function takes two arguments, the low and high
numbers of the desired range. It only works with integers. You can put in real
numbers in the range but the result will still be an integer.
To use RANDBETWEEN:
1. Position the pointer in the cell where you want the results displayed.
2. Enter =RANDBETWEEN( to begin the formula.
3. Click the cell that has the low number of the desired range, or enter
such a value.
4. Enter a comma ( ,).
5. Click the cell that has the highest number of the desired range, or
enter such a value.
6. Type a ), and press Enter.
For example, =RANDBETWEEN(10,20) returns a random integer between
10 and 20.
Remember the Beatles? John, Paul, George, and Ringo? If you’re a drummer,
you may think of the Beatles as Ringo, John, Paul, and George. The order of
items in a list is known as a permutation. The more items in a list, the more
possible permutations exist.
Excel provides the PERMUT function. It takes two arguments: the total
number of items to choose from and the number of items to be used in
determining the permutations. The function returns a single whole number. The
syntax of the function follows:
=PERMUT(total number of items, number of items to use)
Use permutations when the order of items is important.