Purpose
Return value
Syntax
=QUOTIENT(numerator,denominator)
- numerator - The number to be divided.
- denominator - The number to divide by.
Using the QUOTIENT function
The QUOTIENT function returns the integer portion of division without the remainder. You can use QUOTIENT to discard the remainder after division. To perform division with a remainder, use the division operator “/”. To return only the remainder, use the MOD function .
QUOTIENT function takes two arguments, numerator and denominator . Numerator is the number that should be divided, and denominator is the number to divide numerator by.
Examples
The number 5 divided by 2 returns 2.5, since 2 goes into 5 two and a half times:
=5/2 // returns 2.5
With the QUOTIENT function, the decimal portion is discarded:
=QUOTIENT(5,2) // returns 2
Other examples:
=QUOTIENT(3,5) // returns 0
=QUOTIENT(25,5) // returns 5
=QUOTIENT(10,3) // returns 3
Notes
- If denominator is zero (0) or a reference to an empty cell, QUOTIENT returns #DIV!
- To return only the remainder, use the MOD function .
Purpose
Return value
Syntax
=RAND()
Using the RAND function
The RAND function returns a random decimal number between 0 and 1. For example, =RAND() will generate a number like 0.422245717. The RAND function takes no arguments . RAND recalculates when a worksheet is opened or changed.
RAND is a volatile function , and can cause performance issues in large or complex worksheets.
Examples
RAND takes no arguments:
=RAND() // returns number like 0.073979356
=RAND() // returns number like 0.080313118
Automatic recalculation
The RAND function will calculate a new result each time a worksheet is edited. To stop random numbers from being updated, copy the cells that contain RAND to the clipboard, then use Paste Special > Values to convert to a static result.
To get a single random number that doesn’t change when the worksheet is calculated, enter =RAND() in the formulas bar and then press F9 to convert the formula into its result.
Multiple random numbers
To generate a set of random numbers in multiple cells, select the cells, enter =RAND() and press control + enter.
Random number between
To generate a random number between a and b, you can use a formula like this:
RAND()*(b-a)+a
For example, to generate a random number between 1 and 9:
RAND()*(9-1)+1
The RANDBETWEEN function can generate random integers between to numbers:
=RANDBETWEEN(1,9) // random number between 1-9
Note: In Excel 365 , the RANDARRAY function is another way to generate multiple random numbers, and to generate random numbers between two values.
Notes
- The RAND function takes no arguments.
- RAND recalculates whenever a worksheet is opened or changed.