Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 53
Default Macro to copy Column 1 of all sheets to a seperate sheet.

Hi,

Can somebody help me create a macro to copy COLUMN 1 of all sheets in a
workbook(there are about 12 sheets) into another sheet??

Cheers
Rajula
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Macro to copy Column 1 of all sheets to a seperate sheet.

Sub CopyData()
Dim bk as workbook, sh as worksheet
Dim i as Long, rng as Range
set bk = Workbooks("SourceData.xls")
set sh = Workbooks("Summary").Worksheets(1)
i = 1
for each sh in bk.Worksheets
set rng = sh.Columns(1)
rng.copy Destination:=sh.Columns(i)
i = i + 1
Next
End sub

--
Regards,
Tom Ogilvy



"Rajula" wrote:

Hi,

Can somebody help me create a macro to copy COLUMN 1 of all sheets in a
workbook(there are about 12 sheets) into another sheet??

Cheers
Rajula

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 multiple sheets to seperate workbooks MY Excel Discussion (Misc queries) 1 October 15th 08 07:23 PM
Seperate data from one sheet to multiple sheets based on a column [email protected] Excel Discussion (Misc queries) 7 September 8th 07 12:31 AM
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
copy all named ranges in a sheet to seperate sheets Chris Salcedo Excel Programming 8 October 10th 05 06:23 AM
in VBA Sheets("mysheet").Copy Befo=Sheets(1) how do i get a reference to the newly created copy of this sheet? Daniel Excel Worksheet Functions 1 July 6th 05 09:57 PM


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