cerebralrust
06-01-2017, 04:43 AM
Hi guys,
I've seen several posts on how to paste into first empty row, however, I am trying my hardest to get this working appreciate your help.
I have one worksheet ( sheet1) which has three buttons Copy 1, copy 2 and copy3.
Copy1 is meant to copy values from cells in H22, I35 and K23 into S3, U3, and V3. Then Copy2 should copy into the next empty row in the table marked by S3 : V14.
I have written the following macro. But it pastes into the first empty row of the column S, U and V which I don't want. I just want to consider the first empty row of this subset S3:V14.
Sub CopyPaste()
Range("H22").Select
Selection.Copy
Range("S" & Lastrow1).End(xlUp).Offset(1, 0).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("K22").Select
Application.CutCopyMode = False
Selection.Copy
Range("U" & Lastrow2).End(xlUp).Offset(1, 0).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("F35").Select
Application.CutCopyMode = False
Selection.Copy
Range("V" & Lastrow3).End(xlUp).Offset(1, 0).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub
Your help is greatly appreciated!
I've seen several posts on how to paste into first empty row, however, I am trying my hardest to get this working appreciate your help.
I have one worksheet ( sheet1) which has three buttons Copy 1, copy 2 and copy3.
Copy1 is meant to copy values from cells in H22, I35 and K23 into S3, U3, and V3. Then Copy2 should copy into the next empty row in the table marked by S3 : V14.
I have written the following macro. But it pastes into the first empty row of the column S, U and V which I don't want. I just want to consider the first empty row of this subset S3:V14.
Sub CopyPaste()
Range("H22").Select
Selection.Copy
Range("S" & Lastrow1).End(xlUp).Offset(1, 0).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("K22").Select
Application.CutCopyMode = False
Selection.Copy
Range("U" & Lastrow2).End(xlUp).Offset(1, 0).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("F35").Select
Application.CutCopyMode = False
Selection.Copy
Range("V" & Lastrow3).End(xlUp).Offset(1, 0).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub
Your help is greatly appreciated!