Add same formula to every cell in the range
I notice that when the below rounding macro is used on a formula instead of a
number, it converts the formula to its calculated number. Is there a macro
that will add the +ROUND() to cells while preserving the formula within the
cell? Thanks in advance for your help!
"Gary''s Student" wrote:
Select the cells you want to convert and run this macro:
Sub round_um()
Set rr = Selection
For Each r In Selection
r.Formula = "=ROUND(" & r.Value & ",0)"
Next
End Sub
--
Gary''s Student - gsnu200798
"Eastar" wrote:
data shown as below
a b
1 5.2312 6.1231
2 15.2323 15.46463
How can I add a round() formula to every cell without doing that to each of
them seprately?
thanks,
|