Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
Is there (or can there be) a macro or a function that changes a formula like
=C1*$R4 in =round(C1*$R4;0) etc. I have many spreadsheets with hundreds of formulas on each sheet that need to be rounded. I would have to change individually every single formula. Is there an easier way? |
#2
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
Depending on how you formatted the cells, you might consider
ToolsOptionsCalculation tab, check Precision as displayed. Look in HELP to read the consequences. -- Kind regards, Niek Otten "fak119" wrote in message ... | Is there (or can there be) a macro or a function that changes a formula like | | =C1*$R4 in =round(C1*$R4;0) etc. | | I have many spreadsheets with hundreds of formulas on each sheet that need | to be rounded. I would have to change individually every single formula. Is | there an easier way? | |
#3
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
One way:
Public Sub WrapARound() Const sWRAPPER As String = "=Round(#; 0)" Dim ws As Worksheet Dim rFormulae As Range Dim rCell As Range For Each ws In ActiveWorkbook.Worksheets On Error Resume Next 'in case no formulae Set rFormulae = ws.Cells.SpecialCells(xlCellTypeFormulas) On Error GoTo 0 If Not rFormulae Is Nothing Then For Each rCell In rFormulae With rCell If Not .Formula Like "=ROUND(*" Then _ .Formula = Replace( _ sWRAPPER, "#", Mid(.Formula, 2)) End With Next rCell End If Set rFormulae = Nothing Next ws End Sub In article , fak119 wrote: Is there (or can there be) a macro or a function that changes a formula like =C1*$R4 in =round(C1*$R4;0) etc. I have many spreadsheets with hundreds of formulas on each sheet that need to be rounded. I would have to change individually every single formula. Is there an easier way? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how to minimize rounding error with complicated formulas | Excel Discussion (Misc queries) | |||
formulas / rounding | Excel Worksheet Functions | |||
Need Formulas for counting multiple conditions | Excel Worksheet Functions | |||
rounding a formula's number | Excel Worksheet Functions | |||
Formulas not working | Excel Worksheet Functions |