Rounding excel numbers

StefanoM

New Member
Joined
Jul 20, 2016
Messages
7
Dear All,
I have to display a rounded number in protected spreadsheet letting the user to dynamically select how may decimal places to put. It works quite well, except when I want a zero at the end of the number.
number to round A1 = 2.002345
decimal places B1 = 1
formula ROUND(A1, B1)
result of the formula = 2
But I want 2.0 to be displayed.

Thank you for your help,
Stefano
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
It works to display the number correctly, but the number is a text, so I cannot use it in further calculation I need (from example using the formula SUMIF).
 
Upvote 0
It works to display the number correctly, but the number is a text, so I cannot use it in further calculation I need (from example using the formula SUMIF).
Let's assume you have your rounded number in cell C1. You have two options:

1) Stick with the =TEXT(...) solution and use VALUE(C1) in your subsequent formulas.

2) Conditionally format cell C1 with a set of rules like this:
Rule =$B$1=1, custom number format 0.0
Rule =$B$1=2, custom number format 0.00
Rule =$B$1=3, custom number format 0.000 and so on.
 
Upvote 0

Forum statistics

Threads
1,214,951
Messages
6,122,449
Members
449,083
Latest member
Ava19

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top