Code
- Dim copyRange As Range, cel As Range, pasteRange As Range
- Set copyRange = ThisWorkbook.Sheets("Invoice").Range("E3,E4,B7,E24")
- Set pasteRange = ThisWorkbook.Sheets("Register").Range("A5")
- For Each cel In copyRange cel.Copy
- ecolumn = Sheet2.Cells(1, Columns.Count).End(xlToLeft).Offset(0, 0).Row
- pasteRange.Cells(1, ecolumn).PasteSpecial xlPasteValues Next Application.CutCopyMode = False
I am trying to copy non adjacent cell from Invoice sheet and paste the in Register sheet in consecutive row starting in A5- D5. I have tried the VBA above however , it copies all the non adjacent cell in A5 one at a time. how do I get them to go A5, B5, C5, D5, then next transfer to the last row.