Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
InputBox doesn't allow non adjacent rows
I have the below procedure which allows me to select a range on 1
sheet and copy each row in that range 10 times, before moving on to the next row. The Application.InputBox method allows me to select multiple rows if they are adjacent, but it only copies the first selected row when the selection contains non-adjacent rows. Is there a work around to this? Thanks in advance for any assistance... <------------------------------------------------------------------------------------------------------------------------- Sub CopySelection10Times() Dim myRange As Range Dim rng As Range Dim i As Long Dim wksto As Worksheet On Error Resume Next Set wksto = ThisWorkbook.Sheets("Metro AHK New") Set myRange = Application.InputBox("Select data to copy", , , , , , , 8) If myRange Is Nothing Then Exit Sub Else End If 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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Add cells on two adjacent rows but non-adjacent columns | Excel Worksheet Functions | |||
Copy non adjacent rows | Excel Discussion (Misc queries) | |||
Compare adjacent fields in adjacent rows | New Users to Excel | |||
Countif on non adjacent rows | Excel Programming | |||
Selecting non-adjacent rows | Excel Programming |