View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Gary Keramidas Gary Keramidas is offline
external usenet poster
 
Posts: 2,494
Default VBA code to edit a formula in excel?

Range("b1").Formula = "=round(" & Range("A1").Value & ",2)"

would take the value of a1 and round it to 2 places and put the result in b1

--


Gary


wrote in message
oups.com...
I am trying to come up with some code that would take a formula and
edit to put in the ROUND function to round the result to 2 places.

Thank you for any ideas.