View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
David David is offline
external usenet poster
 
Posts: 1,560
Default How can I replace a formula with its result using a macro?

Hi,
Or if you want to select the cells to replace with values first, you can use
this:
Sub Macro1()
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
ActiveSheet.Paste
Application.CutCopyMode = False
End Sub

Thanks,
--
David


"RAP" wrote:

I need help in writing a macro that will take a certain row of formula
results and replace them with the results only, eliminating the formula.
Stated differently, I need to automate the manual instructions of selecting
the row of formula results, copying them, then pasting values only back into
the original cells.

Any help would be greatly appreciated. I am fairly new to macros and this
is proving to be a little more than I can handle at the moment. Thank you.
Randy