select rows & copy into a different sheet

  • Thread starter Thread starter Steve
  • Start date Start date
S

Steve

I need help coding a procedure which will display an input box allow
me to select various rows to copy from sheet("Condensed") and place
them after the last row containing data in sheet("Expanded"). The
catch is I need to copy each row in the selection 10 times before
copying the next row in the selection. Does anyone have any ideas on
how to code this?

Thanks in advance for any assistance...
 
Sub aa()

Dim myRange As Range
Dim i As Long
Dim wksto As Worksheet
Set wksto = ThisWorkbook.Sheets("Expanded")
Set myRange = Application.InputBox("Select data to copy", , , , , , , 8)

For i = 1 To myRange.Rows.Count
myRange.Rows(i).EntireRow.Copy wksto.Cells(wksto.Rows.Count,
1).End(xlUp).Offset(1, 0).Resize(10, myRange.Columns.Count)
Next
Application.CutCopyMode = False
End Sub
 
revised

Sub aa()

Dim myRange As Range
Dim i As Long
Dim wksto As Worksheet
Set wksto = ThisWorkbook.Sheets("Expanded")
Set myRange = Application.InputBox("Select data to copy", , , , , , , 8)

For i = 1 To myRange.Rows.Count
myRange.Rows(i).EntireRow.Copy wksto.Cells(wksto.Rows.Count,
1).End(xlUp).Offset(1, 0).Resize(10, wksto.Columns.Count)
Next
Application.CutCopyMode = False
End Sub
 
Back
Top