How to Set Decimal Places in Excel with Formula (5 Effective Ways)

This tutorial will explain how to set decimal places in Excel with a formula. Sometimes, we may need to get values up to a fixed decimal place. For instance, we have a dataset that contains values with five decimal places. But, we want to limit the values only up to two decimal places. We can do this in several ways. In this article, we will use a unique dataset to illustrate the methods of this task.


Download Practice Workbook

You can download the practice workbook from here.


5 Effective Ways to Set Decimal Places in Excel with Formula

Throughout this article, we will show 5 effective ways to set decimal places in Excel with a formula. To illustrate the methods, we will use the following dataset. The dataset contains the GPA of five students. In each method of this article, we will show how to set the values of GPA up to two decimal places in excel with a formula.

5 Effective Ways to Set Decimal Places in Excel with Formula


1. Excel ROUND Function to Set Decimal Places

First and foremost, we will use the ROUND function to set decimal places in excel with a formula. The ROUND function rounds a number to the number of digits specified. The function allows you to round numbers up or down. Let’s see the steps to use the ROUND function in this method.

STEPS:

  • To begin with, select cell D5.
  • In addition, insert the following formula in that cell:
=ROUND(C5,2)

Excel ROUND Function to Set Decimal Places

  • Press Enter.
  • Furthermore, drag the Fill Handle tool from cell D5 to D9.
  • Lastly, we get results like the following image. In the image, we can see the values of GPA up to two decimal places.

Read More: How to Remove Decimals in Excel with Rounding (10 Easy Methods)


2. Set Decimal Places with ROUNDUP Function

In the second method, we will use the ROUNDUP function to set decimal places in excel with a formula. The ROUNDUP function in Excel rounds a value up to the decimal point on the right or left. Let’s see the steps to use this function.

STEPS:

  • First, select cell D5.
  • Next, type the following formula in that cell:
=ROUNDUP(C5,2)

Set Decimal Places with ROUNDUP Function

  • Hit Enter.
  • Next, pull the Fill Handle tool from cell D5 to D9 as well.
  • Finally, we obtain the following results. We can see the GPA values up to two decimal places with upper rounding in the below image.

Read More: How to Remove Decimals Without Rounding in Excel (4 Suitable Ways)


3. Use Formula with Excel ROUNDDOWN Function

In this method, we will use the ROUNDDOWN function to set decimal places in excel with a formula. The ROUNDDOWN function in Excel rounds a number down to the nearest tenth. To use this function follow the below steps.

STEPS:

  • Firstly, select cell D5.
  • Secondly, insert the following formula in that cell:
=ROUNDDOWN(C5,2)

Use Formula with Excel ROUNDDOWN Function

  • Press Enter.
  • Thirdly, drag the Fill Handle tool from cell D5 to D10.
  • Lastly, we get results up to two decimal places.

Read More: Excel 2 Decimal Places without Rounding (4 Efficient Ways)


4. Decimal Places Setting with TRUNC Function in Excel

We can also use the TRUNC function to set decimal places in excel with a formula. The TRUNC function in Excel truncates a number to a specified number of digits. To use this formula follow the below steps.

STEPS:

  • To begin with, select cell D5.
  • Additionally, enter the following formula in that cell:
=TRUNC(C5,2)

Decimal Places Setting with TRUNC Function in Excel

  • Hit Enter.
  • Furthermore, pull the Fill Handle tool from cell D5 to D10.
  • In the end, we can see the result in the following image. We get the values of GPA up to two decimal places.

Read More: How to Fix Decimal Places in Excel (7 Simple Ways)


Similar Readings


5. Combine FLOOR and IF Functions to Set Decimal Places

Another way to set decimal places in excel with formula is to use a combination of the FLOOR and IF functions. The FLOOR function in Excel rounds down both the integer number and decimal number to the nearest specified multiple of significance. The IF function is used to check if a condition is met and then the defined statements will be shown based on the given condition. Let’s see the steps to combine these two functions.

STEPS:

  • Firstly, select cell D5.
  • Secondly, type the following formula in that cell:
=FLOOR(C5, IF(C5>0, 0.01, -0.01))

Combine FLOOR and IF Functions to Set Decimal Places

  • Press Enter.
  • Furthermore, drag the Fill Handle tool from cell D5 to D9.
  • As a result, in the following image, we can see the values of GPA up to two decimal places.

🔎 How Does the Formula Work?

  • IF(C5>0, 0.01, -0.01): This section calculates the value of the given numbers to two decimal places. If the value in C5 is positive and greater than 0, it will return 01 rather than -0.01.
  • FLOOR(C5, IF(C5>0, 0.01, -0.01)): In this part, we use the FLOOR function to pass the cell number, which is C5 as well as the IF function’s return value.

Read More: How to Reduce Decimals in Excel (10 Easy Methods)


How to Set Decimal Places in Excel Without Formula

This section is the extension part of this article. Till now we used formulas to set decimal places in Excel. But, in this section, we will discuss how to set decimal places in excel without a formula.


1. Apply Excel ‘Format Cells’ Option

We can use Excel’s Format Cells option to set decimal places without a formula. To illustrate this we will use the following dataset. The dataset contains GPAs of five students in two semesters. Also, we can see a column showing the CGPA of students. We will set the values of CGPA up to two decimal places with the Format Cells option.

Apply Excel Format Cells Option to Set Decimal Places

To do this follow the below steps.

STEPS:

  • First, select the cell range (E5:E9).
  • Next, right-click on the selected area.
  • Then, click on the option Format Cells.

Apply Excel Format Cells Option to Set Decimal Places

  • A new dialogue box named Format Cells will appear.
  • Following, select the option Number from the Category
  • Subsequently, set the value 2 in the Decimal places.
  • Now, click on OK.

  • Finally, we get results like the following image.

Read More: How to Insert Dot between Numbers in Excel (3 Ways)


2. Utilize the ‘Increase Decimal’ and ‘Decrease Decimal’ Buttons

Microsoft Excel provides us with two buttons in the Number section of the Home tab. These are Increase Decimal and Decrease Decimal buttons. Using these two buttons we can easily set decimal places in excel without using formulas. To illustrate this method we will use the dataset of the previous method. Let’s see the steps to perform this method.

STEPS:

  • In the beginning, select the cell range (E5:E9).
  • Then, go to the Home tab.
  • After that, from the Number section of the ribbon click on the ‘Decrease Decimal’ button thrice.

Utilize ‘Increase Decimal’ and ‘Decrease Decimal’ Buttons

  • Finally, we can see the result in the following image. The value of CGPA is set to two decimal places.

NOTE: Similar to the above procedure we can use the ‘Increase Decimal’ button to increase the number of digits after the decimal point.

Read More: How to Remove Decimal Places in Excel (5 Easy Methods)


Conclusion

In conclusion, this post will show you how to set decimal places in excel with a formula. To put your skills to the test, use the practice worksheet that comes with this article. Please leave a comment below if you have any questions. Our team will try to reply to you as soon as possible. In the future, keep an eye out for more unique Microsoft Excel solutions.


Related Articles

Mukesh Dipto

Mukesh Dipto

Hi there! I am Mukesh Dipto. I graduated with a bachelor's degree in engineering. Currently, I am working as a technical content writer in ExcelDemy. You will find all my articles on Microsoft Excel on this site. Outside of the workplace, my hobbies and interests include sports and meeting new people. I also enjoy sports. My favorite sports are football (to watch and play) and Badminton (play).

We will be happy to hear your thoughts

Leave a reply

ExcelDemy
Logo