View Single Post
 
Old 01-02-2018, 02:04 PM
NoSparks NoSparks is offline Windows 7 64bit Office 2010 64bit
Excel Hobbyist
 
Join Date: Nov 2013
Location: British Columbia, Canada
Posts: 842
NoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of light
Default

Code:
Sub SecondLocationOfGoalPosts()

Dim rng As Range, cl As Range
Dim wr As Long, i As Integer

Set rng = Sheets("sheetx").Range("A2", Sheets("sheetx").Range("A" & Rows.Count).End(xlUp))
wr = 2

With Sheets("label_data")
    For Each cl In rng
        For i = 1 To cl.Offset(, 9).Value * 2
            .Cells(wr, 1) = cl
            .Cells(wr, 2) = cl.Offset(, 1)
            .Cells(wr, 3) = cl.Offset(, 3)
            .Cells(wr, 4) = cl.Offset(, 6)
            .Cells(wr, 5) = cl.Offset(, 9)
            .Cells(wr, 6) = cl.Offset(, 10)
            .Cells(wr, 7) = cl.Offset(, 11)
            wr = wr + 1
        Next i
    Next cl
End With

End Sub
Reply With Quote