Hi guys,
I'm trying to create a button that essentially copies a column of data from one worksheet (prime) and pastes this column of data in another worksheet (secondary).
However, I want to be able to keep pressing this button so that the newly pasted data in secondary is pasted into the next column. So whatever new inputs in the prime column will be copy pasted into a new column to the right of the previous copy paste. So far, I have this code below:
The problem is it only copies and pastes to one column...
Sub CollateProcurement()
Dim NextRow As Long
With Worksheets("Trend Analysis")
iLastColumn = .Range("H7").End(xlToRight).Column
Sheets("Procurement Pre Mobilisation").Range("I4").Copy .Range("H7")
Sheets("Procurement Pre Mobilisation").Range("I5").Copy .Range("H8")
Sheets("Procurement Pre Mobilisation").Range("I6").Copy .Range("H9")
Sheets("Procurement Pre Mobilisation").Range("I7").Copy .Range("H10")
Sheets("Procurement Pre Mobilisation").Range("I8").Copy .Range("H11")
Sheets("Procurement Pre Mobilisation").Range("I9").Copy .Range("H12")
Sheets("Procurement Pre Mobilisation").Range("I10").Copy .Range("H13")
Sheets("Procurement Pre Mobilisation").Range("I11").Copy .Range("H14")
Sheets("Procurement Pre Mobilisation").Range("I12").Copy .Range("H15")
Sheets("Procurement Pre Mobilisation").Range("I13").Copy .Range("H15")
Sheets("Procurement Pre Mobilisation").Range("I14").Copy .Range("H17")
Sheets("Procurement Pre Mobilisation").Range("I15").Copy .Range("H18")
Sheets("Procurement Pre Mobilisation").Range("I16").Copy .Range("H19")
Sheets("Procurement Pre Mobilisation").Range("I17").Copy .Range("H20")
Sheets("Procurement Pre Mobilisation").Range("I18").Copy .Range("H21")
Sheets("Procurement Pre Mobilisation").Range("I19").Copy .Range("H22")
Sheets("Procurement Pre Mobilisation").Range("I20").Copy .Range("H23")
Sheets("Procurement Pre Mobilisation").Range("I21").Copy .Range("H24")
Sheets("Procurement Pre Mobilisation").Range("I22").Copy .Range("H25")
End with
End Sub
Any help would be greatly appreciated!
Thanks guys.
Kind regards,
M
Bookmarks