Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Arif
 
Posts: n/a
Default blank rows between copied rows

hi, if i have 10 rows of data and would like to copy them into a new sheet
with a condition of 4 blank rows of each row data, so the second will be in
the $th row, and so on, how can i do this??

exmp:

before after
12345 Andrew XXX YYY 12345 Andrew XXX YYY
12356 Andy TTT UUU -
12675 Adro NNN MMM -
13452 Budi LLL OOO -
14567 Lory MMM PPP 12356 Andy TTT UUU
etc..

Any help would be appreciated..


  #2   Report Post  
Posted to microsoft.public.excel.misc
starguy
 
Posts: n/a
Default blank rows between copied rows


I dont know what you really mean. please explain exactly what you want.


--
starguy
------------------------------------------------------------------------
starguy's Profile: http://www.excelforum.com/member.php...o&userid=32434
View this thread: http://www.excelforum.com/showthread...hreadid=539141

  #3   Report Post  
Posted to microsoft.public.excel.misc
Olly
 
Posts: n/a
Default blank rows between copied rows

Sub CopyWithRowSpaces()

Dim iSourceRow As Long, iTargetRow As Long, iBlankRows As Long

iSourceRow = 1 ' Starting row of your source dataset
iTargetRow = 1 ' Starting row of your target dataset
iBlankRows = 3 ' Set this value to the number of blank rows you'd like
in-between data rows

While Worksheets("Sheet1").Cells(iSourceRow, 1).Value < ""
Worksheets("Sheet1").Rows(iSourceRow).EntireRow.Co py
Worksheets("Sheet1").Paste
Destination:=Worksheets("Sheet2").Cells(iTargetRow , 1)
iSourceRow = iSourceRow + 1
iTargetRow = iTargetRow + iBlankRows
Application.CutCopyMode = False
Wend

End Sub


HTH.

--
Olly


"Arif" wrote in message
...
hi, if i have 10 rows of data and would like to copy them into a new sheet
with a condition of 4 blank rows of each row data, so the second will be
in
the $th row, and so on, how can i do this??

exmp:

before after
12345 Andrew XXX YYY 12345 Andrew XXX YYY
12356 Andy TTT UUU -
12675 Adro NNN MMM -
13452 Budi LLL OOO -
14567 Lory MMM PPP 12356 Andy TTT UUU
etc..

Any help would be appreciated..




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
Listing data without blank rows Dannycol Excel Worksheet Functions 8 May 1st 06 06:05 PM
Insert blank rows repeatedly between every data row in Excel Cool Excel Discussion (Misc queries) 2 January 9th 06 12:10 PM
combine speadsheets leaving no blank rows on master page Combining spreadsheets in Excel Excel Discussion (Misc queries) 3 October 24th 05 05:20 PM
how do I print grid lines for blank rows gailrolfe Excel Discussion (Misc queries) 3 February 25th 05 05:22 AM
Blank Rows Acesmith Excel Discussion (Misc queries) 1 November 30th 04 09:23 PM


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