Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
 
Posts: n/a
Default can this be done simply ?

I have say 200 rows in sheet 1.

I want to copy row 1 sheet 1 to row 1 of sheet 2
row 2 of sheet 1 to row 10 of sheet 2
row 3 to row 19
row 4 to row 28

ROW i gets copied to ROW 9*(i-1) + 1

Thanks for any help.

  #2   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student
 
Posts: n/a
Default can this be done simply ?

It can be done with a very small macro:

Sub Macro1()
Dim r1, r2 As Range
For i = 1 To 200
Set r1 = Sheets("Sheet1").Rows(i)
Set r2 = Sheets("Sheet2").Rows(9 * (i - 1) + 1)
r1.Copy r2
Next
End Sub



--
Gary's Student


" wrote:

I have say 200 rows in sheet 1.

I want to copy row 1 sheet 1 to row 1 of sheet 2
row 2 of sheet 1 to row 10 of sheet 2
row 3 to row 19
row 4 to row 28

ROW i gets copied to ROW 9*(i-1) + 1

Thanks for any help.


  #3   Report Post  
Posted to microsoft.public.excel.misc
KellTainer
 
Posts: n/a
Default can this be done simply ?


In sheet2, type this in cell A1

=IF(ISBLANK(Sheet1!A1),"",IF(MOD(ROW(Sheet1!A1),9) = 1, Sheet1!A1,
""))

Drag the fill handle right and down as much as you need.

Now you have copied those cells you wanted, but to formalise the
values, you just copy the cells on sheet2, and then paste special back
on the selected area, values.


--
KellTainer
------------------------------------------------------------------------
KellTainer's Profile: http://www.excelforum.com/member.php...o&userid=34322
View this thread: http://www.excelforum.com/showthread...hreadid=550710

  #4   Report Post  
Posted to microsoft.public.excel.misc
 
Posts: n/a
Default can this be done simply ?


Gary''s Student wrote:
It can be done with a very small macro:

Sub Macro1()
Dim r1, r2 As Range
For i = 1 To 200
Set r1 = Sheets("Sheet1").Rows(i)
Set r2 = Sheets("Sheet2").Rows(9 * (i - 1) + 1)
r1.Copy r2
Next
End Sub



--
Gary's Student



worked like a charm.

Thank you very much.

" wrote:

I have say 200 rows in sheet 1.

I want to copy row 1 sheet 1 to row 1 of sheet 2
row 2 of sheet 1 to row 10 of sheet 2
row 3 to row 19
row 4 to row 28

ROW i gets copied to ROW 9*(i-1) + 1

Thanks for any help.



  #5   Report Post  
Posted to microsoft.public.excel.misc
 
Posts: n/a
Default can this be done simply ?


KellTainer wrote:
In sheet2, type this in cell A1

=IF(ISBLANK(Sheet1!A1),"",IF(MOD(ROW(Sheet1!A1),9) = 1, Sheet1!A1,
""))

Drag the fill handle right and down as much as you need.

Now you have copied those cells you wanted, but to formalise the
values, you just copy the cells on sheet2, and then paste special back
on the selected area, values.


--
KellTainer



The macro worked , but I can' t get this method to work. It does do
something but not what I want.
------------------------------------------------------------------------
KellTainer's Profile: http://www.excelforum.com/member.php...o&userid=34322
View this thread: http://www.excelforum.com/showthread...hreadid=550710


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
How do I exchange cell information; simply swap locations? IslandGirl24 Excel Worksheet Functions 0 April 19th 06 04:54 PM
Excel 2003 Simply Stopped Working Tracie Excel Worksheet Functions 1 March 30th 06 04:08 AM
intergrate microsoft office2003 with simply accouting2006 awtmld Excel Discussion (Misc queries) 1 January 30th 06 04:33 AM
Macro to simply bring up the Find dialogue box?? marika1981 Excel Discussion (Misc queries) 14 January 14th 05 10:47 PM
i discover that i cannot scroll in each part if i simply freeze p. hhh Excel Worksheet Functions 4 December 7th 04 02:42 AM


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