The code I'm using is:
Sub selectrange()
Dim rngSource As Range, rngDest As Range
Set rngSource = Range(Range("A1"), Range("A1").End(xlDown).End(xlToRight))
'Only used to check the data being copied
rngSource.Select
Set rngDest = Range("A1").End(xlToRight).Offset(0, 1)
rngSource.Copy
rngDest.PasteSpecial
End Sub
The idea is to have the code select all the rows/columns with data and paste them in the next available section of another workbook. But by running this code only some of the columns are copied and pasted.
The data in question has 12 columns (A to L), some of them empty aside from the header. When I used End(xlToRight).End(xlDown) the Selection stopped at the first empty cell in any row, so instead I did End(xlDown) on column A which contains dates, then End(xlToRight) to include all possible columns regardless if they have data or not.
However when doing this, the selection arbitrarily stops at column E, despite the fact column F in populated and without blank cells...
If anyone has any ideas it would be greatly appreciated!
Thanks