ups.com
Subject: Re: $$Excel-Macros$$ Round of numbers
Sub NumRoundTwo()
Dim rng As Range
With ActiveSheet.UsedRange
If Not .SpecialCells(xlCellTypeConstants, 1) Is Nothing Then
For Each rng In .SpecialCells(xlCellTypeConstants, 1)
rng.Value
cel-Macros$$ Round of numbers
Sub NumRoundTwo()
Dim rng As Range
With ActiveSheet.UsedRange
If Not .SpecialCells(xlCellTypeConstants, 1) Is Nothing Then
For Each rng In .SpecialCells(xlCellTypeConstants, 1)
rng.Value = Round(rng.Value, 2)
Sub NumRoundTwo()
Dim rng As Range
With ActiveSheet.UsedRange
If Not .SpecialCells(xlCellTypeConstants, 1) Is Nothing Then
For Each rng In .SpecialCells(xlCellTypeConstants, 1)
rng.Value = Round(rng.Value, 2)
Next rng
End If
End
Dear Sandeep,
Can you share a sample workbook..
On Thu, Feb 16, 2012 at 7:08 PM, wrote:
> Dear Excel gurus,
>
> I have a sheet with figures and formulas.
> I want a macro which can convert all the numbers in to round off up to two
> decimal but not the formulas.
>
>
> Like if in any cell va
Dear Excel gurus,
I have a sheet with figures and formulas.
I want a macro which can convert all the numbers in to round off up to two
decimal but not the formulas.
Like if in any cell value is 22.455
Macro should do +round(22.455,2) automatically.
But if it is sum(a2:a9). It should remain same
Subject: Re: $$Excel-Macros$$ Round of numbers
Sub FormulaRound()
Dim rng As Range
For Each rng In ActiveSheet.UsedRange.SpecialCells(xlCellTypeFormulas)
rng.Formula = "=ROUND(" & Right(rng.Formula, Len(rng.Formula) - 1)
& ",2)"
Next rng
End Sub
Regard
Sub FormulaRound()
Dim rng As Range
For Each rng In ActiveSheet.UsedRange.SpecialCells(xlCellTypeFormulas)
rng.Formula = "=ROUND(" & Right(rng.Formula, Len(rng.Formula) - 1)
& ",2)"
Next rng
End Sub
Regards,
Sam Mathai Chacko
On Wed, Feb 15, 2012 at 11:40 PM, wrote:
> Dea
Dear Excel Expert,
I have a worksheet which is linked with a base file.
Now I want a macro to automatically round up to 2 decimal all the formulas of
worksheets.
That is if a link is now showing +'sheet1!$C$9 or +sum(a1:b2)the macro will
automatically convert it
+round('sheet1!$C$9,2) or +