ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   how to display rounded number in a cell w/formula (https://www.excelbanter.com/excel-discussion-misc-queries/145837-how-display-rounded-number-cell-w-formula.html)

Hershey

how to display rounded number in a cell w/formula
 
I have a formula in place, my result appears as 1.746724891, i'd like an auto
rounded # to appear w/out interfereing w/the formula already in place.
How do I do this?

Ron Coderre

how to display rounded number in a cell w/formula
 
Select the cell(s) to be impacted

From the Excel main menu:
<format<cells<Number tab
Experiment with the Category and Type options.

If none of them are appropriate....
Post back with your requirements and we'll see if a Custom Number Format
will work for you.

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"Hershey" wrote:

I have a formula in place, my result appears as 1.746724891, i'd like an auto
rounded # to appear w/out interfereing w/the formula already in place.
How do I do this?


Peo Sjoblom

how to display rounded number in a cell w/formula
 
If it is just for appearance then format the cell as number with decimals to
your liking


--
Regards,

Peo Sjoblom


"Hershey" wrote in message
...
I have a formula in place, my result appears as 1.746724891, i'd like an
auto
rounded # to appear w/out interfereing w/the formula already in place.
How do I do this?




T. Valko

how to display rounded number in a cell w/formula
 
You can format the cell as NUMBER n decimal places. However, this only
affects the *displayed* value. If you format to 2 decimal places the cell
will display 1.75 but the true underlying value of the cell is still
1.746724891.

You could wrap your current formula inside the ROUND function. The value
returned in this case is the true underlying value.

=ROUND(your_formula,2)

Returns 1.75 as the true underlying value.

Biff

"Hershey" wrote in message
...
I have a formula in place, my result appears as 1.746724891, i'd like an
auto
rounded # to appear w/out interfereing w/the formula already in place.
How do I do this?




Gord Dibben

how to display rounded number in a cell w/formula
 
If you don't want to format to 2 decimal places for appearance and need the
value actually rounded, you can use this macro to add the ROUND function to all
cells in place.

Sub RoundAdd()
Dim myStr As String
Dim cel As Range
For Each cel In Selection
If cel.HasFormula = True Then
If Not cel.Formula Like "=ROUND(*" Then
myStr = Right(cel.Formula, Len(cel.Formula) - 1)
cel.Value = "=ROUND(" & myStr & ",2)"
End If
End If
Next
End Sub


Gord

On Fri, 8 Jun 2007 11:39:02 -0700, Hershey
wrote:

I have a formula in place, my result appears as 1.746724891, i'd like an auto
rounded # to appear w/out interfereing w/the formula already in place.
How do I do this?




All times are GMT +1. The time now is 03:45 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com