Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 3
Question Macro to copy rows into worksheets

Ill try to explain best I can.

Recently found (finally..) a macro to auto create worksheets named after whats in Column A (5 digit number). I have one master worksheet and now 47 sheets titled with each ID from column A.

Now I have 47 rows with information on the master worksheet and 47 empty worksheets.

How do I put each row into each worksheet? ... Worksheet one will contain row 2, worksheet 2, row 3 etc etc.

I should also mention that row 1 is the header(?) says the titles ...that should be copied in addition to each row.

make sense?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Macro to copy rows into worksheets

Hi,
Where in any of the 47 worksheets should rows(2,3,...n) from master sheet be positioned? Second row fixed position I would suppose.
Pascal
  #3   Report Post  
Junior Member
 
Posts: 3
Default

Quote:
Originally Posted by pascal baro View Post
Hi,
Where in any of the 47 worksheets should rows(2,3,...n) from master sheet be positioned? Second row fixed position I would suppose.
Pascal

Yes 2nd row in each sheet
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,872
Default Macro to copy rows into worksheets

Hi,

Am Tue, 24 Jul 2012 18:55:36 +0000 schrieb cupcakex:

Yes 2nd row in each sheet


following code copies the header and the rows to each sheet:
Sub CopyRows()
Dim i As Integer

With Sheets(1)
For i = 2 To 47
.Rows("1").Copy Destination:=Sheets(i).Range("A1")
.Rows(i).Copy Destination:=Sheets(i).Range("A2")
Next
End With
End Sub


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
  #5   Report Post  
Junior Member
 
Posts: 3
Talking

Quote:
Originally Posted by Claus Busch View Post
Hi,

Am Tue, 24 Jul 2012 18:55:36 +0000 schrieb cupcakex:

Yes 2nd row in each sheet


following code copies the header and the rows to each sheet:
Sub CopyRows()
Dim i As Integer

With Sheets(1)
For i = 2 To 47
.Rows("1").Copy Destination:=Sheets(i).Range("A1")
.Rows(i).Copy Destination:=Sheets(i).Range("A2")
Next
End With
End Sub


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2

AMAZING!!!! you have saved me so much time thank you x10000000!!
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 Rows with a cell value 0 from several worksheets to a new sh Skeletor Excel Worksheet Functions 4 October 2nd 08 09:24 AM
macro to copy multiple rows to separate worksheets OrlaH Excel Worksheet Functions 2 June 8th 06 03:15 PM
Macro simplifying - copy rows to worksheets based on values in 2 different columns markx Excel Programming 1 February 27th 06 03:36 PM
Copy rows from different worksheets cbrd[_24_] Excel Programming 8 January 10th 06 06:28 PM
Subject: Macro- Copy same rows into own worksheets LesleyC Excel Programming 2 May 26th 05 08:59 PM


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