Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 93
Default Copy contiguous from one sheet and paste to another every other ro

I am trying to write a macro that copies from Sheet1 contiguous data A1:A30
and paste data to Sheet2 to every other row (ie Sheet1.A1 to Sheet2.A1;
Sheet1.A2 to Sheet2.A3; Sheet1.A3 to Sheet2.A5 and so on). The pasted result
is data with blank cells in between. Thanks in advance.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 130
Default Copy contiguous from one sheet and paste to another every other ro

Sub tst()
Dim s1 As String
Dim s2 As String
s1 = Sheet1.Name
s2 = Sheet2.Name

Sheets(s1).Select

Range("A1").Select
Selection.Copy
Sheets(s2).Select
Range("A1").Select
ActiveSheet.Paste

Sheets(s1).Select
Range("A2").Select
For i = 1 To 30
Application.CutCopyMode = False
Selection.Copy

Sheets(s2).Select
ActiveCell.Offset(2, 0).Activate
ActiveSheet.Paste
Sheets(s1).Select
ActiveCell.Offset(1, 0).Activate
Next i


End Sub


dmoney

"Dean" wrote:

I am trying to write a macro that copies from Sheet1 contiguous data A1:A30
and paste data to Sheet2 to every other row (ie Sheet1.A1 to Sheet2.A1;
Sheet1.A2 to Sheet2.A3; Sheet1.A3 to Sheet2.A5 and so on). The pasted result
is data with blank cells in between. Thanks in advance.

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
Copy Paste from Class Sheet to Filtered List on Combined Sheet [email protected] Excel Programming 6 September 16th 08 04:30 PM
Help to code Macro to Copy fron one sheet and paste in other sheet kay Excel Programming 3 July 25th 08 06:46 PM
Copy from one Sheet and paste on another sheet based on condition Prem Excel Discussion (Misc queries) 2 December 24th 07 05:05 AM
Copy and Paste LAST ROW of data: non-contiguous Row, contiguous Column Sam via OfficeKB.com Excel Programming 8 November 5th 07 07:18 PM
Copy and Paste LAST ROW of data non-contiguous Sam via OfficeKB.com Excel Programming 6 October 29th 07 02:28 PM


All times are GMT +1. The time now is 01:09 PM.

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"