1. Technology
You can opt-out at any time. Please refer to our privacy policy for contact information.

Limit the Number or Rows and Columns in an Excel Worksheet

By

Limit Rows and Columns in Excel - Temporarily
Limit Rows in an Excel Worksheet

Limit Rows in an Excel Worksheet

© Ted French

Limit Rows and Columns in Excel - Temporarily

Even though each worksheet in Excel 2007 or 2010 can have more than 1,000,000 rows and more than 16,000 columns it's not often that we need that much room.

Mostly we use considerably fewer than the maximum number of rows and columns and sometimes it might be an advantage to limit access to unused areas of the worksheet.

For example, to avoid accidental changes to certain data it is sometimes useful to place it in area of the worksheet where it can't be reached.

Or, if less experienced users need to access your worksheet limiting where they can go can keep them from getting lost in the empty rows and columns that sit outside the data area.

Whatever the reason, you can temporarily limit the number of rows and columns accessible by changing the Scroll Area property of the worksheet.

Example: Temporarily Limit Rows and Columns in a Worksheet

For help with this example, see the image above.

Note: This setting is retained only so long as a workbook is open. Once it is closed any changes to the scroll area are removed.

In this example we will change the properties of a worksheet to limit the number of rows to 30 and the number of columns to 26.

  1. Open a blank Excel file.

  2. Right-click on the sheet tab at the bottom right of the screen for Sheet 1.

  3. Click on View Code in the menu to open the Visual Basic for Applications (VBA) editor window.

  4. Find the Sheet Properties window in the bottom left corner of the VBA editor window.

  5. Find the Scroll Area property in the list of worksheet properties.

  6. Click in the empty box to the right of the Scroll Area label.

  7. Type a1:z30 in the box.

  8. Click on File > Save in the menus to open the Save as dialog box.

  9. Choose a filename and location and click Save to save the worksheet.

  10. Close the VBA editor window and return the worksheet.

  11. Test the worksheet. You should not be able to scroll below row 30 or to the right of column Z.

  12. In addition you should not be able to click on a cell beyond Z30 in the worksheet.

  13. To remove the scroll restrictions, close and reopen the workbook.

Other Excel Tips

©2014 About.com. All rights reserved.