Hi all,
I'm trying to create a VBS script (noob here) that copy's various selected cells to sheet2 to the next available row. A basic example would be to select cells A1, C4 and D8 on sheet1 then copy to sheet2 to the next available row. Example the next available row is row 4 on sheet2 so the selected cells on sheet1 A1, C4 and C8 would copy to cells A4, B4 and C4 on sheet to in order. I found the below which was helpful but not quite what I need:
Copy Values to Next Empty Row
Sub CopyStuff()
Range("A1:J1").Copy
Sheets("Sheet2").Range("A" & Rows.Count).End(xlUp).Offset(1, 0).PasteSpecial xlPasteValues
End Sub
The above works perfectly if you data on sheet1 on is in a sequence eg. A1:A8 but as soon as you change the range to something like A1, C4, C8 it copy's each cell to a new row.
Please can anyone help?
Thank you in advance
I'm trying to create a VBS script (noob here) that copy's various selected cells to sheet2 to the next available row. A basic example would be to select cells A1, C4 and D8 on sheet1 then copy to sheet2 to the next available row. Example the next available row is row 4 on sheet2 so the selected cells on sheet1 A1, C4 and C8 would copy to cells A4, B4 and C4 on sheet to in order. I found the below which was helpful but not quite what I need:
Copy Values to Next Empty Row
Sub CopyStuff()
Range("A1:J1").Copy
Sheets("Sheet2").Range("A" & Rows.Count).End(xlUp).Offset(1, 0).PasteSpecial xlPasteValues
End Sub
The above works perfectly if you data on sheet1 on is in a sequence eg. A1:A8 but as soon as you change the range to something like A1, C4, C8 it copy's each cell to a new row.
Please can anyone help?
Thank you in advance