Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021. 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: Turning Off AutoFill for a Workbook.
Written by Allen Wyatt (last updated May 21, 2022)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021
The AutoFill feature of Excel can be a great timesaver when entering information. However, you may want to disable the feature for a particular workbook; perhaps you don't want the feature to be used by anyone using your workbook. Doing so is easy if you create a macro that can recognize when you are working with that particular workbook.
To turn off the AutoFill feature for a particular workbook, follow these steps:
Private Sub Workbook_Activate() Application.CellDragAndDrop = False End Sub
Private Sub Workbook_Deactivate() Application.CellDragAndDrop = True End Sub
The first macro is only run when the particular workbook is activated. In other words, when the workbook attains focus or is selected. When a different workbook attains focus, then the second macro is executed.
Note:
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (11197) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021. You can find a version of this tip for the older menu interface of Excel here: Turning Off AutoFill for a Workbook.
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!
Need to fill a range of cells with the days of the week? Excel makes it easy to do so using AutoFill.
Discover MoreAutoFill is a great tool for filling cells with data. What do you do when it doesn't work like you expect, however? ...
Discover MoreIf you need to fill a number of cells with a specific sequence of characters (such as the alphabet), there are several ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)
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.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2024 Sharon Parq Associates, Inc.
Comments