In the processing of numbers in EXCEL, the specified digits are often rounded as needed.
Rounding of numbers can be accomplished by the following functions:
Rounding =ROUND(A 1, 0)
Rounding decimal = rounding down (a 1, 0) = lower bound (a 1, 1) = trunc (a 1)
Truncated decimals are rounded to the nearest even number = even number (A 1).
Truncate Decimal and Round Up = Upper Limit (A 1, 1)
Truncated decimal =INT(A 1)
=====================
EXCEL software itself has a large number of such functions built in.
1. Rounds the numeric function.
(1) function
Rounds a number to the specified number of digits.
(2) Format
ROUND (numeric value or numeric cell, the specified number of digits)
(3) Examples
A column b column
12.35 1
325.525
……
B 1 input formula
(1) Keep 2 decimal places-from thousands to hundreds.
=ROUND(A 1,2)= 12.35
Copy the recipe to B2
=ROUND(A2,2)=325.53
② Rounding to integer-rounding from decimal to decimal, and keeping the integer.
B 1 input formula
=ROUND(A 1,0)= 12
Copy the recipe to B2
=ROUND(A2,0)=326
③ Rounding to ten digits-rounding from one digit to ten digits and then to ten digits.
B 1 input formula
=ROUND(A 1,- 1)= 10
Copy the recipe to B2
=ROUND(A2,- 1)=330
Description:
The parameter 1 of function ROUND can be a specific numerical value or a numerical cell reference.
ROUND- the second parameter of the function specifies the reserved digits, and the reserved decimal digits are expressed as positive integers, namely 1, 2,3,4 ... (corresponding to decimals, percentiles, thousandths and tens of thousands ...); The reserved integer bits are represented by non-positive integers, that is, 0,-1, -2, -3, ... (corresponding to single bit, ten bits, hundred bits ...).
2. Round the numeric function down.
(1) function
Rounds a numeric value by the specified number of digits.
(2) Format
Rounds down (numeric value or numeric cell, specified number of digits)
(3) Examples
A column b column
12.35 1
325.525
……
B 1 input formula
(1) Keep 2 decimal places-omit thousands and subsequent percentiles.
= Round down (A 1, 2)= 12.35.
Copy the recipe to B2
= Round down (a2,2) = 325.52
② Rounding decimal places to keep integer-rounding decimal places to keep integer parts.
B 1 input formula
= Round down (A 1, 0)= 12
Copy the recipe to B2
=ROUNDDOWN (A2,0)=325
(3) Integer is reserved to ten digits-the integer part discards digits greater than 0 (instead of 0) and retains ten digits and the previous high digits.
B 1 input formula
= rounding down (A 1,-1)= 10.
Copy the recipe to B2
= Round down (A2,-1)=320.
Description:
The 1 th parameter of the function ROUNDDOWN can be a specific numerical value or a numerical cell reference.
The second parameter of the function ROUNDDOWN-specifies the reserved digits, and the reserved decimal digits are expressed as positive integers, namely 1, 2, 3, 4 ... (corresponding to decimals, percentiles, thousandths and tens of thousands ...); The reserved integer bits are represented by non-positive integers, that is, 0,-1, -2, -3, ... (corresponding to single bit, ten bit, hundred bit ...).
Comparison between function rounding and function rounding;
The ROUND function rounds the number on the right according to the specified number of digits.
The ROUNDDOWN function discards the number on the right as 0 according to the specified number of digits.
3. Rounds the lower bound function down to a multiple of the specified number.
(1) function
Rounds a number to a multiple of the specified number in the direction of decreasing absolute value.
(2) Format
Lower limit (numerical value or numerical unit, specified number)
(3) Examples
A column b column
1245.25 1
……
= FLOOR(A 1,5)= 1245
= FLOOR(A 1,4)= 1244
= FLOOR(A 1,3)= 1245
= FLOOR(A 1,2)= 1244
= FLOOR(A 1, 1)= 1245
The second parameter cannot be 0, in other words, no definite number is the closest multiple of 0.
= FLOOR(A 1,0. 1)= 1245.2
(= floor (A 1, 0.2)= 1245.2)
= floor (A 1, 0.3)= 1245
= floor (A 1, 0.4)= 1245.2
= floor (A 1, 0.7)= 1244.6
……)
= FLOOR(A 1,0.0 1)= 1245.25
= FLOOR(A 1,0.00 1)= 1245.25 1
Description:
The 1 th parameter can be positive or negative.
The sign of the second parameter is exactly the same as that of the 1 parameter.
The second parameter cannot be 0.
The return value of the function is an integer multiple of the second parameter, that is, the return value can be divisible by the second parameter.
4. Round to the nearest even function even number.
(1) function
Returns the nearest even number rounded in the direction of increasing absolute value.
(2) Format
Even Numbers (Numeric Values or Numeric Cells)
(3) Examples
A column b column
1245.25 1
1245.52 1
- 1245.25 1
……
B2 input formula
= even number (A 1)= 1246
Copy it down and give it to B2.
= even number (A2)= 1246
Then copy to B3.
= even number (A3)=- 1246
Description:
The EVEN function always takes the integer even value closest to the original data in the direction where the absolute value does not increase.
5. Round up to the specified data multifunction limit.
(1) function
Rounds the value up (in the direction of increasing absolute value) to the nearest multiple of the specified data.
(2) Format
Upper limit (numerical value or numerical unit, specifying data)
(3) Examples
A column b column
1245.25 1
1245.52 1
- 1245.25 1
- 1245.52 1
3.6
……
B 1 input formula
= upper limit (A 1, 4)= 1248
B2 input formula
= Upper limit (A2, 0.4)= 1245.6
B3 input formula
= ceiling (A3, -5)=- 1250
Enter the formula in B4
= ceiling (A4, -0.7)=- 1246
Enter the formula in B5.
= Upper limit (A5, 0.3)=3.6
Description:
Upper bound function and lower bound function are similar rounding functions. Please refer to the floor function for relevant precautions.
The lower bound function is rounded down in the direction of decreasing absolute value, and the upper bound function is rounded up in the direction of increasing absolute value.
6. Truncate the rounding function
(1) function
The significant digits after the specified digits are truncated to return data.
(2) Format
TRUNC (numeric value or numeric cell, specifying the number of digits)
(3) Examples
A column b column
1245.25 1
① Rounding decimals to integers.
B 1 cell input formula.
=TRUNC(A 1, 0) or =TRUNC(A 1), and the return value is 1245.
② Keep 1 decimal place.
B 1 cell input formula.
=TRUNC(A 1, 1)= 1245.2
③ Keep the hundred digits.
B 1 cell input formula.
=TRUNC(A 1,-2)= 1200
Description:
TRUNC function does not round the specified reserved digits and the digits on the right, but directly replaces them with 0.
7. Round down to the nearest integer function int.
(1) function
Rounds a number down to the nearest integer.
(2) Format
INT (numeric value or numeric cell)
(3) Examples
A column b column
1 1.52
5. 12
-7. 1
-5.8
……
Enter the formula in B 1.
=INT(A 1)= 1 1
Cell B2 was copied.
=INT(A2)=5
Copy the formula down to cell A3.
=INT(A3)=-8
Copy the formula down to cell B4.
=INT(A4)=-6
Description:
This function always takes an integer value in decreasing direction, without rounding. When the numerical value is positive, the decimal is truncated and the integer is retained; When the value is negative, truncate the decimal and put in the integer.
In addition to the INT(X) function can be rounded (directly remove the decimal part), there are several other functions with similar functions:
ROUND(X, 0) for rounding;
ROUNDDOWN(X, 0) rounds down (equivalent to the function of INT ());
FOOLR(X) rounds down (equivalent to the function of INT ());
Even numbers (x) are rounded;
The ceiling (x, 1) is rounded up.
Comparison of calculation results of several functions;
INT(3.2)=3
INT(3.9)=3
ROUND(3.2,0)=3
ROUND(3.9,0)=4
ROUNDDOWN(3.2,0)=3
ROUNDDOWN(3.9,0)=3
FOOLR(3.2)=3
FOOLR(3.9)=3
Even number (3.2)=4
Even number (3.9)=4
Upper limit (3. 1. 1)= 4.
Upper limit (3.9, 1)=4