Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-02-2018, 02:04 PM
NoSparks NoSparks is offline creating multiple data rows, for labels based on a cell value Windows 7 64bit creating multiple data rows, for labels based on a cell value 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
Reply

Tags
adding multiple rows, mail merge, vba



Similar Threads
Thread Thread Starter Forum Replies Last Post
Extracting multiple words from one cell into individual rows while copying all other data randyaserve Excel Programming 4 10-05-2015 09:52 AM
Hide rows in multiple columns based on zero values Deane Excel Programming 19 06-23-2015 11:24 PM
creating multiple data rows, for labels based on a cell value Insert values from multiple rows based on value in one column pachmarhi Excel 3 07-18-2014 09:57 PM
creating multiple data rows, for labels based on a cell value Creating formula based on if data is correct in cell MattMurdock Excel 1 08-06-2012 03:11 AM
creating multiple data rows, for labels based on a cell value Hide Rows and Update Chart based on cell value ubns Excel Programming 5 05-07-2012 05:44 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:46 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft