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


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.


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. ...


Checking for Proper Entry of Array Formulas

Excel allows you to enter two different types of formulas in a cell: A regular formula or an array formula. If you need ...

Discover More

Changing from Pirated to Permitted Software

When you install Microsoft Office, you are required to enter a product key that unlocks the software for your use. This ...

Discover More

Using the System Information Tool

Need to lift the hood and look into the inner workings of Windows? One place you can do this easily is through the System ...

Discover More

Excel Smarts for Beginners! Featuring the friendly and trusted For Dummies style, this popular guide shows beginners how to get up and running with Excel while also helping more experienced users get comfortable with the newest features. Check out Excel 2013 For Dummies today!

More ExcelTips (ribbon)

Counting Atoms in a Chemical Formula

Chemical formulas use a notation that shows the elements and the number of atoms of that element that comprise each ...

Discover More

Copying a Set Range from Multiple Worksheets to a New Worksheet

Want to create a summary worksheet that pulls a single row of data from each worksheet in the workbook? Here are a couple ...

Discover More

Making Sure Numbers Copy as Numbers

When you copy information from one worksheet to another using a macro, you might not get exactly what you want. This tip ...

Discover More

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

View most recent newsletter.


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 nine minus 3?

2024-04-28 11:39:49

J. Woolley

To limit the scroll area on a sheet:
1. Select the scroll area range on that sheet.
2. Pick Formulas > Defined Names > Define Name (Alt+M+M+D).
3. In the New Name dialog, enter
Name: ScrollArea
Scope: Workbook
Comment: Limited scroll area range
Refers to: ... (previously selected range)
4. Right-click the sheet's tab and pick View Code to open the VB Editor.
5. Copy the following code and paste it into the Sheet module (replacing the Tip's code):

Private Sub Worksheet_Activate()
Me.ScrollArea = Me.Parent.Names("ScrollArea").RefersTo
End Sub

6. Right-click the ThisWorkbook module in VB Editor and pick View Code.
7. Copy the following code and paste it into the ThisWorkbook module:

Private Sub Workbook_Open()
End Sub

8. Save and close your workbook.
Whenever your workbook is opened that sheet will be activated with limited scroll area. If you change the sheet's name or position, "ScrollArea" will automatically adjust. And you can edit the "Refers to:" range using the Name Manager (Alt+M+N) if necessary.

2024-04-27 17:41:10


Hi Allen,

This doesn't seem to work when opening my document, only after I navigate from that sheet and then back (perhaps with it being the first sheet of the doc?)

Sadly I am not a VBA Whizz so unsure on how to remedy this


2022-11-24 21:21:41


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

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.