Hi guys, I am not really familiarized with VBA, any help is really appreciated.!!
I am trying to copy a range of columns ("JMM:JSX") that have been hidden and paste them into the next blank cell of the 2nd row from the same sheet.
I have this but it keeps throwing me errors.
Sub test()
Dim copySheet As Worksheet
Dim pasteSheet As Worksheet
Set copySheet = Worksheets("Pack")
Set pasteSheet = Worksheets("Pack")
copySheet.Range("JMM:JSX").Copy
With pasteSheet
.Cells(2, .Columns.Count).End(xlToLeft).Offset(0, 1).PasteSpecial _
Paste:=xlPasteValues, Operation:=xlNone
End With
I am trying to copy a range of columns ("JMM:JSX") that have been hidden and paste them into the next blank cell of the 2nd row from the same sheet.
I have this but it keeps throwing me errors.
Sub test()
Dim copySheet As Worksheet
Dim pasteSheet As Worksheet
Set copySheet = Worksheets("Pack")
Set pasteSheet = Worksheets("Pack")
copySheet.Range("JMM:JSX").Copy
With pasteSheet
.Cells(2, .Columns.Count).End(xlToLeft).Offset(0, 1).PasteSpecial _
Paste:=xlPasteValues, Operation:=xlNone
End With