Harry Flashman
Active Member
- Joined
- May 1, 2011
- Messages
- 361
I have a workbook that is generated by an online portal. When I try to find the last cell in the data I notice that the column is actually blank yet Excel is acting as if it must contain data.
Thus Range("A1").CurrentRegion includes two columns to the right of my data that are completely blank.
Likewise if I write something like Range("A1").End(xlToRight) the cell returned is completely blank (it is actually two cells to the right of my data table). Or if I write Cells(1, Rows(1).Cells.Count).End(xlToLeft), I get the same blank cell, that is actually two columns to the right of my data.
Can anyone suggest what might be going on with these cells? Why does Excel act as if these cells contain data?
Thus Range("A1").CurrentRegion includes two columns to the right of my data that are completely blank.
Likewise if I write something like Range("A1").End(xlToRight) the cell returned is completely blank (it is actually two cells to the right of my data table). Or if I write Cells(1, Rows(1).Cells.Count).End(xlToLeft), I get the same blank cell, that is actually two columns to the right of my data.
Can anyone suggest what might be going on with these cells? Why does Excel act as if these cells contain data?