Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 921
Default pastespecial

Hi,
Can someone please help me with the following task:
I am trying to copy a block of cells from sheet1 (starting from
Cell("B1")) and ending on the last cell (most right, most down cell, which
may vary on each execution), paste only values into sheet2.


Thanks,
Jeff

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default pastespecial

Hi Jeff,

See a reply at your previous post.


---
Regards,
Norman



"Jeff" wrote in message
...
Hi,
Can someone please help me with the following task:
I am trying to copy a block of cells from sheet1 (starting from
Cell("B1")) and ending on the last cell (most right, most down cell, which
may vary on each execution), paste only values into sheet2.


Thanks,
Jeff



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 46
Default pastespecial

Just Change the range's you want.
Start at B1:
End at R845


Sub Macro2()
'

'
Range("B1:R845").Select
Selection.Copy
Sheets("Sheet2").Select
Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("A1").Select
End Sub

DJ

"Jeff" wrote:

Hi,
Can someone please help me with the following task:
I am trying to copy a block of cells from sheet1 (starting from
Cell("B1")) and ending on the last cell (most right, most down cell, which
may vary on each execution), paste only values into sheet2.


Thanks,
Jeff

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 983
Default pastespecial

Public Sub Tada()
Dim rngToCopy As Range

Set rngToCopy = Sheets("Sheet1").Range("B1",
Range("B1").SpecialCells(xlCellTypeLastCell))
rngToCopy.Copy

Sheets("Sheet2").Select
Sheets("Sheet2").Range("B1").PasteSpecial xlPasteValues

Set rngToCopy = Nothing
End Sub


"Jeff" wrote:

Hi,
Can someone please help me with the following task:
I am trying to copy a block of cells from sheet1 (starting from
Cell("B1")) and ending on the last cell (most right, most down cell, which
may vary on each execution), paste only values into sheet2.


Thanks,
Jeff

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default pastespecial

Hi Jeff,

I missed your paste values addendum.

Try:

Sub Tester()
Dim rng As Range
With ActiveWorkbook.Sheets("Sheet1")
Set rng = .Cells(1, Columns.Count).End(xlToLeft)
Set rng = Cells(Rows.Count, rng.Column).End(xlUp)
Range(.Range("B1"), rng).Copy
Sheets("Sheet2").Range("A1").PasteSpecial Paste:=xlValues
End With
Application.CutCopyMode = False
End Sub

---
Regards,
Norman



"Jeff" wrote in message
...
Hi,
Can someone please help me with the following task:
I am trying to copy a block of cells from sheet1 (starting from
Cell("B1")) and ending on the last cell (most right, most down cell, which
may vary on each execution), paste only values into sheet2.


Thanks,
Jeff



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
PasteSpecial KL[_3_] Excel Programming 1 July 8th 04 02:07 PM
Pastespecial and cut Ron[_23_] Excel Programming 4 April 26th 04 02:14 AM
pastespecial in vba cornishbloke[_13_] Excel Programming 7 December 31st 03 01:02 PM
vba pastespecial joao Excel Programming 2 November 14th 03 03:31 PM
pastespecial billQ Excel Programming 2 July 29th 03 11:39 PM


All times are GMT +1. The time now is 04:04 AM.

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

About Us

"It's about Microsoft Excel"