Paste Special (Values)

C

Chris

I have the following code and I want to paste it as values.

Sheets("TableData").Range("A" & k).Copy
Destination:=Sheets("Sheet2").Range("A" & j)

(k and j are variables.)
 
G

Guest

Sheets("TableData").Range("A" & k).Copy
Sheets("Sheet2").Activate
Sheets("Sheet2").Range("A1").PasteSpecial Paste:=xlPasteValues

What you want to specify as your destination is the top left-most cell of
your destination range.
 
D

Dave Peterson

Sheets("TableData").Range("A" & k).Copy
Sheets("Sheet2").Range("A" & j).pastespecial paste:=xlpastevalues

or just assign the value

Sheets("Sheet2").Range("A" & j).value _
= Sheets("TableData").Range("A" & k).value
 
T

Trevor Shuttleworth

Something like:

With Sheets("TableData")
.Range("A" & k).Copy
.Range("A" & j).PasteSpecial _
Paste:=xlPasteValues, _
Operation:=xlNone, _
SkipBlanks:=False, _
Transpose:=False
End With

Regards

Trevor
 
T

Trevor Shuttleworth

Sorry

missed the fact that the destination was on another sheet. But the others
have given the answer

Regards
 
C

Chris

Sheets("TableData").Range("A" & k).Copy
Sheets("Sheet2").Range("A" & j).pastespecial paste:=xlpastevalues

or just assign the value

Sheets("Sheet2").Range("A" & j).value _
= Sheets("TableData").Range("A" & k).value

Thanks! Your second method gets the job done.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top