Disable or Change the F1 Help Shortcut in Excel
Question details
The user wants to prevent accidental presses of F1 from opening Excel Help or assign the key to another action.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- The user presses F1 accidentally while working with cells and wants to avoid interruptions.
- Observed behavior
- Pressing F1 opens Excel Help and interrupts the user's work.
The VBA steps below apply to Excel for Windows and require access to the Visual Basic Editor. Check whether your organization's security settings allow VBA commands before proceeding.
Temporarily Disable F1 Using Excel VBA
Use the Immediate window to stop Excel from responding to F1 without changing system-wide keyboard settings.
In Excel for Windows, press Alt+F11 to open the Visual Basic Editor.
Press Ctrl+G, or select View > Immediate Window.
In the Immediate window, enter Application.OnKey "{F1}", "" and press Enter. Return to Excel and test the F1 key.
In the Immediate window, enter Application.OnKey "{F1}" and press Enter to restore Excel's default F1 behavior.

Assign F1 to an Excel VBA Macro
Use this approach if you want F1 to run an existing macro instead of opening Help.
Work With Spreadsheets in WPS Office
WPS Office is a free, lightweight alternative for working with spreadsheets in a familiar interface. Open compatible Excel files to make the transition easier; it does not change Excel's F1 shortcut.

Frequently Asked Questions
Can I permanently disable F1 in Excel settings?
Excel does not provide a standard setting to permanently change F1. In Excel for Windows, you can temporarily disable it by running Application.OnKey "{F1}", "" in the VBA Immediate window.
How do I turn the F1 Help shortcut back on?
Press Alt+F11 in Excel, press Ctrl+G, and run Application.OnKey "{F1}" in the Immediate window.
Why does F1 still open Help while I am editing a cell?
Application.OnKey may not intercept F1 in every Excel context, including cell edit mode. Test the shortcut both inside and outside cell editing to see where the command applies.
Can F1 run my own macro instead of opening Help?
Yes. In the VBA Immediate window, run Application.OnKey "{F1}", "MyMacro", replacing MyMacro with an available macro name. The workbook containing the macro must be open and its macro must be allowed to run.
Will the F1 change apply outside Excel?
No. Application.OnKey changes how Excel handles the shortcut; it does not remap F1 across Windows or other applications.




