Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Limiting Scroll Area.

Limiting Scroll Area

Written by Allen Wyatt (last updated June 26, 2021)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365


1

When putting together a worksheet for others to use, you may want to limit the cells that the user can access. One esoteric way to add limits is to use the following steps:

  1. Right-click the sheet tab for the sheet on which you want to place a limit.
  2. In the resulting Context menu, choose View Code. The VBA editor appears, displaying the code window for the worksheet whose tab you right-clicked.
  3. If the Properties window is not visible, press F4.
  4. In the Properties Window, place the insertion point in the box to the right of the Scroll Area property. (See Figure 1.)
  5. Figure 1. The Properties window in the VBA Editor.

  6. Enter the range in which you want navigation possible. For instance, if you want the user to only be able to access the cells in the range A3:D15, then enter that range.
  7. Close the VBA Editor.

That's it; you can no longer move to or select cells outside the range you specified in step 5. The range you enter must be a contiguous range; you cannot enter a non-contiguous group of cell addresses.

You should be aware that the ScrollArea property is reset each time you restart Excel. So, if you want the scroll area to be automatically set every time you use the worksheet, you may want to set up a macro to do the modification to the property. You can do that with a simple one, like this:

Private Sub Worksheet_Activate()
     ActiveSheet.ScrollArea = "A3:D15"
End Sub 

The macro is automatically run whenever the worksheet is activated, so you are ensured that the scroll area is exactly what you want.

Note:

If you would like to know how to use the macros described on this page (or on any other page on the ExcelTips sites), I've prepared a special page that includes helpful information. Click here to open that special page in a new browser tab.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (10815) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365. You can find a version of this tip for the older menu interface of Excel here: Limiting Scroll Area.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Stopping Styles from Changing with Multiple Users

Using styles in your documents can be very helpful when it comes to consistency and ease of formatting. When others open ...

Discover More

Entering Characters with Diacritical Marks

Entering characters that use diacritical marks is easy as pie in Word and some other programs. Not so in Excel, it takes ...

Discover More

Pop-Up Comments for Graphics

Excel allows you to add comments to individual cells in a worksheet, but what if you want to add comments to graphics? ...

Discover More

Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!

More ExcelTips (ribbon)

Understanding Variables in VBA Macros

You can create and use all sorts of variables in your macros. This tip examines all the different data types you can specify.

Discover More

Inserting Worksheet Values with a Macro

Macros are often used to process information in a worksheet. You may need your macro to change the values stored in ...

Discover More

Determining an Integer Value

When creating macros, you often need to process numbers in various ways. VBA allows you to convert a numeric value to an ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 1 + 1?

2022-11-24 21:21:41

Tomek

The tip says:
"You should be aware that the ScrollArea property is reset each time you restart Excel. "

Actually, this setting will be reset if you just close and reopen the file, without closing Excel. (at least in MS365).

Also, be aware that if you set the ScrollArea many navigation shortcuts will be deactivated, e.g., End + Arrow key or Ctrl+End, if the navigation would bring you outside the ScrollArea. In other words it will not bring you to the edge of the scroll area, contrary to what you may expect.


This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.