PC Review


Reply
Thread Tools Rate Thread

copy paste loop---new to vba

 
 
=?Utf-8?B?TUZS?=
Guest
Posts: n/a
 
      26th Oct 2006
need to create a loop that copies each row to a different sheet. . . . .
..row2 to sheet(2).range (A2), row3 to sheet(3) range (A2) etc. from
a single worksheet.

 
Reply With Quote
 
 
 
 
Don Guillett
Guest
Posts: n/a
 
      26th Oct 2006
why not
rows("2:66").copy sheets("yoursheet").rows(2)


--
Don Guillett
SalesAid Software
(E-Mail Removed)
"MFR" <(E-Mail Removed)> wrote in message
news:4FC85E81-7FA4-4E12-9851-(E-Mail Removed)...
> need to create a loop that copies each row to a different sheet. . . . .
> .row2 to sheet(2).range (A2), row3 to sheet(3) range (A2) etc. from
> a single worksheet.
>



 
Reply With Quote
 
=?Utf-8?B?UmVuYXRvIE0uIFQu?=
Guest
Posts: n/a
 
      26th Oct 2006
Hi,

You can use

For I = 1 to 100 'Or more times
Sheets("2").cells(1+I,1).value = Sheets("1").cells(1+I,1).value 'this is
for the 1º column
Sheets("2").cells(1+I,2).value = Sheets("1").cells(1+I,2).value 1 'for the
2º column

Next I


"MFR" escreveu:

> need to create a loop that copies each row to a different sheet. . . . .
> .row2 to sheet(2).range (A2), row3 to sheet(3) range (A2) etc. from
> a single worksheet.
>

 
Reply With Quote
 
=?Utf-8?B?TUZS?=
Guest
Posts: n/a
 
      26th Oct 2006
Renato---
Thanks, I see how this will loop through rows, how can I get it to loop
through the entire workbook simultaneously.

row2 in worksheet2
row3 in worksheet3
row4 in worksheet4

"Renato M. T." wrote:

> Hi,
>
> You can use
>
> For I = 1 to 100 'Or more times
> Sheets("2").cells(1+I,1).value = Sheets("1").cells(1+I,1).value 'this is
> for the 1º column
> Sheets("2").cells(1+I,2).value = Sheets("1").cells(1+I,2).value 1 'for the
> 2º column
>
> Next I
>
>
> "MFR" escreveu:
>
> > need to create a loop that copies each row to a different sheet. . . . .
> > .row2 to sheet(2).range (A2), row3 to sheet(3) range (A2) etc. from
> > a single worksheet.
> >

 
Reply With Quote
 
Don Guillett
Guest
Posts: n/a
 
      26th Oct 2006

just create a

for i = 2 to 4
do your thing (think about it)
next i

--
Don Guillett
SalesAid Software
(E-Mail Removed)
"MFR" <(E-Mail Removed)> wrote in message
news:C87D69C9-998C-4BFB-9764-(E-Mail Removed)...
> Renato---
> Thanks, I see how this will loop through rows, how can I get it to loop
> through the entire workbook simultaneously.
>
> row2 in worksheet2
> row3 in worksheet3
> row4 in worksheet4
>
> "Renato M. T." wrote:
>
>> Hi,
>>
>> You can use
>>
>> For I = 1 to 100 'Or more times
>> Sheets("2").cells(1+I,1).value = Sheets("1").cells(1+I,1).value 'this is
>> for the 1º column
>> Sheets("2").cells(1+I,2).value = Sheets("1").cells(1+I,2).value 1 'for
>> the
>> 2º column
>>
>> Next I
>>
>>
>> "MFR" escreveu:
>>
>> > need to create a loop that copies each row to a different sheet. . . .
>> > .
>> > .row2 to sheet(2).range (A2), row3 to sheet(3) range (A2) etc. from
>> > a single worksheet.
>> >



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy and Paste Loop AK Microsoft Excel Programming 2 26th Nov 2009 09:27 AM
Copy and Paste using a loop bestie via OfficeKB.com Microsoft Excel Programming 0 3rd Aug 2006 08:57 AM
Copy and Paste Loop japorms Microsoft Excel Programming 2 19th Jul 2006 09:07 PM
Copy/Paste Loop =?Utf-8?B?SmVsbHknJ3M=?= Microsoft Excel Programming 2 7th Dec 2005 12:03 AM
Copy/Paste loop PRINCE21 Microsoft Excel Misc 3 5th Feb 2004 12:27 AM


Features
 

Advertising
 

Newsgroups
 


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