Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I'm trying to format a cell to round numbers DOWN as I type them.
Right now, Excel seems to only round numbers UP. Is there any way to do this without using the ROUNDDOWN formula? I know I can use the ROUNDDOWN formula, but that only works if he formula is in a different cell from the data. Thanks. |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You can never get Excel to round numbers by using formatting, the display
rounds up or down depending on the number, however the underlying value is still the same. You can only get this upon entry by using an event macro -- Regards, Peo Sjoblom wrote in message ups.com... I'm trying to format a cell to round numbers DOWN as I type them. Right now, Excel seems to only round numbers UP. Is there any way to do this without using the ROUNDDOWN formula? I know I can use the ROUNDDOWN formula, but that only works if he formula is in a different cell from the data. Thanks. |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Formatting won't actually round values up or down, unless you have the
Tools/Options/Calculation/Precision as displayed checkbox checked. To actually round values down as you type, you'd need an event macro. You could put something like this in your worksheet code module (right-click the worksheet tab and choose View Code): Private Sub Worksheet_Change(ByVal Target As Excel.Range) Const csINPUTRNG As String = "A1:A100, C1:C100" Const cnDECPLACES = 2 Dim dScale As Double With Target If Not Intersect(Range(csINPUTRNG), Target) Is Nothing Then dScale = 10 ^ -cnDECPLACES On Error Resume Next Application.EnableEvents = False .Value = Int(.Value / dScale) * dScale Application.EnableEvents = True End If End With End Sub In article . com, wrote: I'm trying to format a cell to round numbers DOWN as I type them. Right now, Excel seems to only round numbers UP. Is there any way to do this without using the ROUNDDOWN formula? I know I can use the ROUNDDOWN formula, but that only works if he formula is in a different cell from the data. Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Rounding numbers | Excel Discussion (Misc queries) | |||
Rounding numbers up or down | Excel Discussion (Misc queries) | |||
Rounding numbers | Excel Discussion (Misc queries) | |||
Rounding up numbers up or down. | Excel Worksheet Functions | |||
Rounding Numbers | Excel Discussion (Misc queries) |