silentcarl
New Member
- Joined
- Feb 29, 2024
- Messages
- 8
- Office Version
- 2010
- Platform
- Windows
Hi all,
Super novice here trying to get something done for my wife and a non-profit she is part of. I hope someone can help save me some time as I have been at this for hours.
I have a set of raw data on one page that is organized by row. (a2, a3, a4...)
I have a separate page with name tags that uses the data and spreads it across 6 rows using formulas. (A3:D8) I need this copied down to A9, then A15, etc.
I have a (nearly) working program that copies the block down, but the automatic cell reference is moving by as many cells as I am copying down. IE cell A2 becomes A8 in the formula because it is copied down the sheet 6 spaces. So I am only getting every 6th data set.
Is there a way to modify what I have to get this, or do I need to approach a different way?
Thanks in advance for any help!
Super novice here trying to get something done for my wife and a non-profit she is part of. I hope someone can help save me some time as I have been at this for hours.
I have a set of raw data on one page that is organized by row. (a2, a3, a4...)
I have a separate page with name tags that uses the data and spreads it across 6 rows using formulas. (A3:D8) I need this copied down to A9, then A15, etc.
I have a (nearly) working program that copies the block down, but the automatic cell reference is moving by as many cells as I am copying down. IE cell A2 becomes A8 in the formula because it is copied down the sheet 6 spaces. So I am only getting every 6th data set.
Is there a way to modify what I have to get this, or do I need to approach a different way?
VBA Code:
Sub UpdatePrint()
Dim UsedRows As Integer
UsedRows = Worksheets("RawData").UsedRange.Rows.Count
Dim i As Long
For i = 3 To UsedRows Step 6
Rows(i).RowHeight = 21
Range("a3:D8").Copy
With Cells(i, 1)
.PasteSpecial xlPasteFormulas
.PasteSpecial xlPasteFormats
End With
With Range("b3:d3")
.Merge
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
End With
Rows(i + 1 & ":" & i + 5).RowHeight = 15
Next i
End Sub
Thanks in advance for any help!