G
Guest
PUZZLE OF THE DAY: I have an Excel file with a worksheet where columns A
(only) are populated with a variable amount of data -- could be three rows,
could be a thousand. For this discussion, let's say there are 50 rows.
When I select A1 and then hit Ctrl-Shift-End, I would expect A150 to be
selected, but I get A1:IV50. I've tried selecting columns E:IV and deleting
them entirely to supposedly reset the used range, but get the same result
when I hit Ctrl-Shift-End.
To make it even more puzzling, if I copy the data from A150 into a new
worksheet in the same workbook, Ctrl-Shift-End works as expected.
And finally, I wrote a little code snippet to show me
ActiveWorkbook.Sheets("nameofsheet").UsedRange.Columns.Count, and it returns
4 in BOTH worksheets.
Who can suggest why this is happening (and ideally, a way to fix it
programmatically)? It's screwing me up when I try to import the weird
worksheet into MSAccess.
(only) are populated with a variable amount of data -- could be three rows,
could be a thousand. For this discussion, let's say there are 50 rows.
When I select A1 and then hit Ctrl-Shift-End, I would expect A150 to be
selected, but I get A1:IV50. I've tried selecting columns E:IV and deleting
them entirely to supposedly reset the used range, but get the same result
when I hit Ctrl-Shift-End.
To make it even more puzzling, if I copy the data from A150 into a new
worksheet in the same workbook, Ctrl-Shift-End works as expected.
And finally, I wrote a little code snippet to show me
ActiveWorkbook.Sheets("nameofsheet").UsedRange.Columns.Count, and it returns
4 in BOTH worksheets.
Who can suggest why this is happening (and ideally, a way to fix it
programmatically)? It's screwing me up when I try to import the weird
worksheet into MSAccess.