Hi all,
I hope this message finds you well. I am somewhat new to excel, so bear with me. I haven't really ventured into VBA and am pretty limited to the recorder at the moment but am learning. I think this is an absolute/relative reference mistake somewhere, but I seem to be stuck on it.
I would like my button to add a set of rows (four rows per sample) to the bottom of the table, and then numerically add 1 to the sample number (i.e. add Sample 2, 3, 4... for each time the button is clicked). This will be used as a test template creator to be used with varying test samples sizes (sample count). Would appreciate any help or direction or a video that may nudge me in the right direction. The problem I'm having is with the Sample number not counting correctly after Sample 2.
Sub Macro19()
'
' Macro19 Macro
'
'
Range("B5:U8").Select
Selection.Copy
Range("B9").Select
Selection.Insert Shift:=xlDown
Range("B9:B12").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=R[-4]C+1"
Range("B9:B12").Select
Selection.Copy
Range("M9:M12").Select
ActiveSheet.Paste
Range("D5").Select
End Sub
Bookmarks