Explanation
The MOD function performs the modulo operation. It takes a number and a divisor and returns the remainder after division.
In this formula, we subtract one MOD result from another.
For the first MOD, we use the number with a divisor that equals the place value we want times 10. For the second MOD, we use the number with a divisor equals to the place value we seek. The formula is solved like this:
=MOD(B8,C8*10)-MOD(B8,C8)
=MOD(123456,1000*10)-MOD(123456,1000)
=3456-456
=3000
Explanation
The ROUND function rounds a number to a given number of places. The number of places is set by the number of digits provided in the second argument ( num_digits ). For example, the formulas below round the number 5.86 to 1 and zero places:
=ROUND(5.86,1) // returns 5.9
=ROUND(5.86,0) // returns 6
In the example shown, we are rounding the values in column B (which are created with the PI function ) using the numbers in column B for digits. The formula in cell D6 is
=ROUND(B6,C6)
This tells Excel to take the value in B6 (PI) and round it to the number of digits in cell C6 (4) with a result of 3.1416
In the table, the ROUND function is used to round the same number (PI) to a decreasing number of digits, starting at 4 and moving down past zero to -1. Notice that digits greater than zero round to the right of the decimal point, and digits less than or equal to zero round to the left.