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..
I dont know what you really mean. please explain exactly what you want.--
starguy
------------------------------------------------------------------------
starguy's Profile: www.excelforum.com/member.php...oamp;userid=32434
View this thread: www.excelforum.com/showthread...hreadid=539141Sub 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(quot;Sheet1quot;).Cells(iSourceRow, 1).Value lt;gt; quot;quot;
Worksheets(quot;Sheet1quot;).Rows(iSourceRow).EntireRow.Co py
Worksheets(quot;Sheet1quot;).Paste
Destination:=Worksheets(quot;Sheet2quot;).Cells(iTargetRow , 1)
iSourceRow = iSourceRow 1
iTargetRow = iTargetRow iBlankRows
Application.CutCopyMode = False
Wend
End SubHTH.
--
Ollyquot;Arifquot; gt; wrote in message
news
gt; hi, if i have 10 rows of data and would like to copy them into a new sheet
gt; with a condition of 4 blank rows of each row data, so the second will be
gt; in
gt; the $th row, and so on, how can i do this??
gt;
gt; exmp:
gt;
gt; before after
gt; 12345 Andrew XXX YYY 12345 Andrew XXX YYY
gt; 12356 Andy TTT UUU -
gt; 12675 Adro NNN MMM -
gt; 13452 Budi LLL OOO -
gt; 14567 Lory MMM PPP 12356 Andy TTT UUU
gt; etc..
gt;
gt; Any help would be appreciated..
gt;
gt;
- Oct 05 Fri 2007 20:39
blank rows between copied rows
close
全站熱搜
留言列表
發表留言