How do I limit the number of rows in an Excel worksheet.

L

laforge27

Rather than over 65,000 rows being available when I open a new worksheet, how
can I limit the number of rows to, say, 200 without having to highlight rows
200 through 65,000 and hide them?
 
G

Gord Dibben

You cannot do away with the unused rows or columns. A worksheet has 256
columns and 65536 rows.

You can hide the rows and columns you don't want to see.
Select them and Format>Hide.

You already knew that<g>

Alternative.........You may want to try setting the Scroll Area.

This setting will not remain after closing the file.
Place a code line in the Workbook open event to set it
each time when you open the workbook.

Right-click on the Excel Logo left of your "File" on menu. Select "View Code"
and paste the following in there. Save the workbook and close/re-open to see
the scrollarea fixed to the range A1:Y200

Private Sub Workbook_Open()
Sheets("Sheet1").ScrollArea = "A1:Y200"
End Sub

Adjust to your sheetname and range.

Gord Dibben Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top