Macro copies formulas versus values.

September 16, 2011 at 13:42:14
Specs: Windows 7
I have found the following macro on your site and it works but it copies the formula instead of the values.

I need help in editing the macro--I have researched this problem and the solution is PasteSpecial but I do not know how to incorporate into this code??

I am new to this site and I am not sure if I posted this twice??

Here is the macro:

Sub RowCopy()
Dim rngFind As Range

With Worksheets("Summary").UsedRange
Set rngFind = .Find("Totals", _
LookIn:=xlValues, _
LookAt:=xlWhole, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=True)
End With
rngFind.EntireRow.Copy _
Destination:=Worksheets("Sheet3").Range("A1")
End Sub


See More: Macro copies formulas versus values.

Report •

#1
September 17, 2011 at 07:36:02
Before posting any more code, please click on the blue line at the end of this post and read the instructions for posting code and data in this forum.

The code below will paste the Values from the copied row.

Sub RowCopy()
Dim rngFind As Range
  With Worksheets("Summary").UsedRange
    Set rngFind = .Find("Totals", _
                     LookIn:=xlValues, _
                     LookAt:=xlWhole, _
                     SearchOrder:=xlByRows, _
                     SearchDirection:=xlNext, _
                     MatchCase:=True)
  End With
    rngFind.EntireRow.Copy
     Worksheets("Sheet3").Range("A1").PasteSpecial Paste:=xlValues
End Su

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Report •
Related Solutions


Ask Question