Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, and Excel in Office 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: Forcing Editing to Be Done in a Cell.
by Allen Wyatt
(last updated November 16, 2019)
Rodolfo knows that he can configure Excel to allow editing in both the Formula bar and the cell itself, but he wants to configure it so that editing can be done only in the cell, not in the Formula bar.
There is no way to do this in Excel. The closest you can come is to make sure that cell editing is enabled (so that editing can be done in either the Formula bar or the cell) and then hiding the Formula bar. You can hide the Formula bar by these steps:
Figure 1. The Advanced options in the Excel Options dialog box.
If you prefer, you can also programmatically turn off the Formula bar for a specific worksheet. You can do this by using the following two macros, which should be assigned to the code for the specific worksheet you want to affect. (You can display the proper code window by right-clicking the worksheet's tab and selecting View Code from the resulting Context menu.)
Private Sub Worksheet_Activate() Application.DisplayFormulaBar = False End Sub
Private Sub Worksheet_Deactivate() Application.DisplayFormulaBar = True End Sub
The first macro turns off the Formula bar when the worksheet is activated, and the second turns it back on when the worksheet is deactivated (when another worksheet is selected).
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (9095) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and Excel in Office 365. You can find a version of this tip for the older menu interface of Excel here: Forcing Editing to Be Done in a Cell.
Save Time and Supercharge Excel! Automate virtually any routine task and save yourself hours, days, maybe even weeks. Then, learn how to make Excel do things you thought were simply impossible! Mastering advanced Excel macros has never been easier. Check out Excel 2010 VBA and Macros today!
Want to select all the data in a contiguous section of a worksheet? The shortcut discussed in this tip makes it very easy.Discover More
Need to get rid of everything in a worksheet except the formulas? It's easier to make this huge change than you think it is.Discover More
Enter information into a cell, and Excel needs to figure out what type of information it is. Here's how Excel interprets ...Discover More
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
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.