I am new to this but I am trying to copy multiple cells in an excel workbook and paste them into a separate tab of the same workbook.
Above is a sample of what my spreadsheet looks like, but my spreadsheet has over 800 lines of data.
I need the names to be copied and put into column A of Sheet2 and then the account numbers into column D of Sheet2.
I have tried this 2 different ways.
Using below code:
Sheets("Sheet1").Select Range("A1,A3,A5,A7,A9").Select Range("A10").Activate Selection.Copy Sheets("Sheet2").Select Range("A1").Select ActiveSheet.Paste Sheets("Sheet1").Select Range("A2,A4,A6,A8,A10").Select Range("A10").Activate Selection.Copy Sheets("Sheet2").Select Range("D1").Select ActiveSheet.Paste
This gives me a
Compile Error Syntax Error
.Code #2
Range("A2").Select Selection.Cut Range("D1").Select ActiveSheet.Paste Range("A4").Select Selection.Cut Range("D3").Select ActiveSheet.Paste ...
This is keeping them in the same tab, instead of pasting them into a separate tab (I would just copy them over later). I repeat this for each customer. This one gives me a range error that basically says it's too large. Unfortunately, I can't recreate it because I deleted it.
Does anyone have a simpler way of doing this that won't cause an error?