Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 118
Default Copy column A and column D from all sheets into new worksheet

How can I copy column A and column D from all sheets to a new sheet
while offsetting the paste ie the 2 column being pasted next to the
other

thxs

posting again as i've got an unclear answer from an ...

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,339
Default Copy column A and column D from all sheets into new worksheet

Hi,
I assume Sheet1 columns A and D are copied to A,B on "newsheet"
and A and D from other sheets are copied to columns C,D/E,F etc as your
request indicates you want to copy columns in total to a single new sheet.

Sub CopyAandD()

Dim oRng As Range
Dim newsh As Worksheet

Set newsh = Worksheets("Sheet3") ' <==== Change to your "new sheet"
Set oRng = newsh.Range("A:A") ' <===== Copy to column A

For Each Sh In ActiveWorkbook.Worksheets
If Sh.Name < newsh.Name Then
Sh.Range("A:A,D:D").Copy oRng
Set oRng = oRng.Offset(0, 2)
End If
Next

End Sub

"al007" wrote:

How can I copy column A and column D from all sheets to a new sheet
while offsetting the paste ie the 2 column being pasted next to the
other

thxs

posting again as i've got an unclear answer from an ...


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 column from different sheets and plot a graph Majeed B Excel Discussion (Misc queries) 3 February 8th 10 01:21 PM
Copy rows of one sheet into mutiple sheets based on column value Wesley Breshears Excel Discussion (Misc queries) 0 October 18th 06 03:19 PM
how to copy contents of one column to another column in another worksheet yefei Excel Discussion (Misc queries) 3 February 25th 06 05:57 PM
Copy column B and column E from all sheets into new worksheet al007 Excel Programming 2 January 21st 06 07:37 AM
how to copy sheets keeping defined column widths garpavco Excel Worksheet Functions 1 January 7th 05 03:47 PM


All times are GMT +1. The time now is 02:50 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"