View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Eastar Eastar is offline
external usenet poster
 
Posts: 6
Default Add same formula to every cell in the range

Thank you Gary, this works.
by the way, can we do this without macro?

thanks,

"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,