Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Paste Special (Values)

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.)

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Paste Special (Values)

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.

------
Cheers,
Anony


"Chris" wrote:

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.)


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Paste Special (Values)

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


Chris wrote:

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.)


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Paste Special (Values)

On Aug 6, 5:05 pm, Dave Peterson wrote:
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

Chris wrote:

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.)


--

Dave Peterson


Thanks! Your second method gets the job done.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,089
Default Paste Special (Values)

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


"Chris" wrote in message
ups.com...
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.)





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,089
Default Paste Special (Values)

Sorry

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

Regards


"Trevor Shuttleworth" wrote in message
...
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


"Chris" wrote in message
ups.com...
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.)





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Paste Special - Values KYMO Excel Worksheet Functions 1 June 8th 06 05:17 PM
paste special values baiju101 Excel Worksheet Functions 1 April 4th 06 02:11 PM
paste special (values) AJPendragon Excel Worksheet Functions 0 February 22nd 05 03:19 PM
Dynamic Copy/Paste Special Formulas/Paste Special Values Sharon Perez Excel Programming 3 August 7th 04 09:49 PM
Paste special values Tim Excel Programming 1 April 7th 04 07:57 PM


All times are GMT +1. The time now is 08:50 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"