The real implementation of Excel software rounding

Source: Internet
Author: User

In our day-to-day work, especially in the Excel cell format, we allow the definition of decimal places, but in practice we find that the numbers themselves do not actually achieve rounding. If this rounding method is used, errors often occur in financial operations, which are not permitted by financial operations.

As shown in Figure 1,a1:a5 is the original data, B1:B5 is the result of preserving two decimal places by setting the cell format. C1:C5 is the data that is rounded to the original data of the A1:A5 and then entered. A6, B6 and C6 are the results of "summation" of the above three-column data respectively. Let's look at columns B and C, the same data, and then we'll get a different result. If you look at columns A and b again, it's not hard to see that the results of the two columns are the same, which means that column B is not really rounding, just hiding the decimal digits.

So, is there a simple and workable way to really round it up? In fact, Excel has provided this function, this is the round function, it can return a number by a specified number of digits rounded after the number.

A function is provided in "math and trigonometric Functions" provided by Excel: ROUND (number,num_digits), which is the function of rounding numbers by the number of digits specified (Figure 2). This function has two parameters, number and num_digits, where numbers are the digits that will be rounded, and num_digits is the number of digits after the decimal point that you want to get the number.

Let's take the A1 column data in Figure 1 as an example: Enter "=round (a1,2)" in cell E2 (Figure 3), which is to keep the two-bit decimal number after rounding the data for the A1 cell. When you enter the car, you will get a 0.12 result. Then, select E1 this cell, drag the Fill handle button in the lower right corner to E5, and in the E6 cell e1:e5 sum the result as shown in Figure 3. This is consistent with the results of the C6 cell, which shows that rounding is really true.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.