O
orangie
I'm trying to use this macro but am having an application, unknown object
error:
Option Explicit
Sub round_made_easy()
Dim myCell As Range
For Each myCell In Selection.Cells
myCell.Formula = "=Round(" & myCell.Formula & ",2)"
Next myCell
End Sub
Now when I try the above it gives me an application error.
But with the following code that you gave me it works great.
Option Explicit
Sub round_made_easy()
Dim myCell As Range
For Each myCell In Selection.Cells
myCell.Formula = "=Round(" & myCell.Value & ",2)"
Next myCell
End Sub
why won't it work for a cell that is =1258/4569871 and keep the 1258/4569871
in the cell's formula of =Round(1258/4569871, 2) ???
Thanks!
error:
Option Explicit
Sub round_made_easy()
Dim myCell As Range
For Each myCell In Selection.Cells
myCell.Formula = "=Round(" & myCell.Formula & ",2)"
Next myCell
End Sub
Now when I try the above it gives me an application error.
But with the following code that you gave me it works great.
Option Explicit
Sub round_made_easy()
Dim myCell As Range
For Each myCell In Selection.Cells
myCell.Formula = "=Round(" & myCell.Value & ",2)"
Next myCell
End Sub
why won't it work for a cell that is =1258/4569871 and keep the 1258/4569871
in the cell's formula of =Round(1258/4569871, 2) ???
Thanks!