Hey everyone, I'm pretty new to this so sorry if this is a rookie question. I have a pretty hefty spreadsheet at work that I'm wanting to do some enhancements to, so I'm working on it at home with a mockup of the same format (false data and not such intricate formatting is the only real change.)
Basically, we have data that we take from Sheet 2 (different numbers of rows each time hence the Current Region selection) and paste to the first blank row of Sheet 1, always starting in Column A. As of now, I have the data cutting/pasting to from Sheet 2 (A1) to the first blank row of Sheet 1, however I can't seem to get the Paste Values only function to work! I've read multiple threads on this, copied/pasted exactly what they have, as well as tried just manually entering the Paste Values only from the VBA Help in Excel, but I keep getting an error message. Can anyone help?
This is the code that works correctly for cut/paste (no attempt at paste special):
Sub MoveCurrentRegion()
Sheets("Sheet2").Range("A1").CurrentRegion.Cut Destination:= _
Sheets("Sheet1").Range("A1").End(xlDown).Offset(1, 0)
End Sub
This is what I've written so far for the attempt at cutting/pasting values only:
Sub PasteSpecialCurrentRegion()
Sheets("Sheet2").Range("A1").CurrentRegion.Cut
Sheets("Sheet1").Range("A1").End(xlDown).Offset(1, 0).PasteSpecial xlPasteValue
End Sub
The error message I'm getting is "Run-time error '1004': PasteSpecial method of Range class failed. Can anyone help me with the right way to write this?
Basically, we have data that we take from Sheet 2 (different numbers of rows each time hence the Current Region selection) and paste to the first blank row of Sheet 1, always starting in Column A. As of now, I have the data cutting/pasting to from Sheet 2 (A1) to the first blank row of Sheet 1, however I can't seem to get the Paste Values only function to work! I've read multiple threads on this, copied/pasted exactly what they have, as well as tried just manually entering the Paste Values only from the VBA Help in Excel, but I keep getting an error message. Can anyone help?
This is the code that works correctly for cut/paste (no attempt at paste special):
Sub MoveCurrentRegion()
Sheets("Sheet2").Range("A1").CurrentRegion.Cut Destination:= _
Sheets("Sheet1").Range("A1").End(xlDown).Offset(1, 0)
End Sub
This is what I've written so far for the attempt at cutting/pasting values only:
Sub PasteSpecialCurrentRegion()
Sheets("Sheet2").Range("A1").CurrentRegion.Cut
Sheets("Sheet1").Range("A1").End(xlDown).Offset(1, 0).PasteSpecial xlPasteValue
End Sub
The error message I'm getting is "Run-time error '1004': PasteSpecial method of Range class failed. Can anyone help me with the right way to write this?