Getting rid of unwanted cells in Excel 97


Posted by Richard Shore on September 25, 2001 5:29 AM

I have a worksheet with approx 900 rows, however I have thousands of blank cells below the last row. Does anyone know how to specify the last row/cell so that when I hit Ctrl/End it goes to line 900 and not line 7,200 ?

Thanx

Rich

Posted by Rodney on September 25, 2001 5:43 AM


If Ctrl/End takes you to row 7200, you must have something down there. However, try running this macro :-

Sub Reset_Last_Cell ()
ActiveSheet.usedRange
End Sub

If that doesn't work, try deleting all rows below where you think your last row is and save the workbook. If that doesn't work, your guess is as good as mine!



Posted by Eric on September 25, 2001 10:16 AM

Another thing to try, hiding rows

Rodney's right, if you "only" go to 7200 when you hit ctrl/end, then you have some hidden data (an errant space bar or something) down below where you expect the end of your data to be. Ctrl/end should take you all the way to row 65,536.

Another way to limit yourself to just the 900 rows you're interested in is to hide everything past 900.
Edit-->"go to"
and enter a901:a65536
click "OK"
Then go Format-->Rows-->hide
all of the rows below 900 will be "hidden" from view.

If you have need of them you can select the entire worksheet by clicking the left upper corner of the sheet address grid (to the left of col A, and above Row 1) and then going
Format-->Rows-->Unhide
HTH