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

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.

admiral100

Well-known Member
Joined
Jan 17, 2015
Messages
873
It's work for me....Are you sure A1 is a number ?
 
Upvote 0

StefanoM

New Member
Joined
Jul 20, 2016
Messages
7
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

Tetra201

MrExcel MVP
Joined
Oct 14, 2016
Messages
3,801
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,191,686
Messages
5,988,067
Members
440,125
Latest member
vincentchu2369

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
Top