Re: $$Excel-Macros$$ Round of numbers

2012-02-16 Thread chhajersandeep
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

Re: $$Excel-Macros$$ Round of numbers

2012-02-16 Thread dguillett1
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)

Re: $$Excel-Macros$$ Round of numbers

2012-02-16 Thread Sam Mathai Chacko
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

Re: $$Excel-Macros$$ Round of numbers

2012-02-16 Thread NOORAIN ANSARI
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

$$Excel-Macros$$ Round of numbers

2012-02-16 Thread chhajersandeep
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

Re: $$Excel-Macros$$ Round of numbers

2012-02-15 Thread chhajersandeep
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

Re: $$Excel-Macros$$ Round of numbers

2012-02-15 Thread Sam Mathai Chacko
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

$$Excel-Macros$$ Round of numbers

2012-02-15 Thread chhajersandeep
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 +