I am struggling with the VBA Code never done anything like this before I want to copy the content of 3 cells E3,E5,E13 to another worksheet named "PaymentHistory" it is all going wrong. I want the copied cells to appear in the "PaymentHistory" Sheet as follows
E3 to A2
E5 to B2
E15 to B2
I also need an offset so that when the button is clicked again the data is stored in a new row in PaymentHistory and not overwrite existing data
I have the below code so far it copies the data but places it randomly - I also need it to paste values I don't want the formatting copied.
Private Sub CommandButton3_Click()
Range("E3", "E5", "E15").Select
Selection.Copy
Sheets("PaymentHistory").Select
ActiveCell.Offset(1, 0).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
End Sub
Bookmarks