Python in Excel keyboard shortcuts
Applies To
Excel for Microsoft 365 Excel for Microsoft 365 for Mac Excel for the web Office for business Microsoft OfficePython in Excel is available to Enterprise and Business users running the Current Channel on Windows, starting with Version 2408 (Build 17928.20114), and Monthly Enterprise Channel on Windows, starting with Version 2408 (Build 17928.20216). It's also available in Excel on the web for Enterprise and Business users. Python in Excel is available in preview for Family and Personal users in Excel on the web or running the Current Channel on Windows starting with Version 2405 (Build 17628.20164). It's available in preview for Education users running the Current Channel (Preview) through the Microsoft 365 Insider Program. It's not currently available for the Semi-Annual Enterprise Channel.
Python in Excel is available in preview on Excel for Mac through the Microsoft 365 Insider Program. Choose the Beta Channel Insider level and install the latest build of Excel. It's available starting with Version 16.95 (Build 25021921).
For more availability information, see Python in Excel availability. If you encounter any concerns with Python in Excel, please report them by selecting Help > Feedback in Excel.
New to Python in Excel? Start with Introduction to Python in Excel and Get started with Python in Excel.
List of keyboard shortcuts
The following list includes keyboard shortcuts that are helpful to know when using Python in Excel.
Shortcut |
Action |
---|---|
=PY |
Enables Python formulas in an Excel cell. |
Ctrl+Alt+Shift+C |
Changes a Python plot from an image object to linked floating plot. |
Ctrl+Alt+Shift+F9 |
Resets the Python runtime. May help resolve #BUSY! or #CONNECT! errors. |
Ctrl+Alt+Shift+F2 |
Launch the Python in Excel code editor task pane. |
Ctrl+Alt+Shift+M |
Toggles Python formula results between Python objects and Excel values. |
Ctrl+Alt+Shift+P |
Like =PY, enables Python formulas in the current cell. |
Ctrl+Enter |
Commits Python formulas in a Python cell. |
Ctrl+F2 |
Toggles between edit mode in the cell and the formula bar. |
Ctrl+Shift+F5 |
When a cell contains a card icon, additional data is available inside card. Ctrl+Shift+F5 opens the card to display the additional data. |
Ctrl+Shift+U |
Expands or collapses the Excel formula bar to view more or fewer lines of code. |
F2 |
Toggles between Enter mode and Edit mode in a Python cell. Edit mode allows you edit the Python formula, and Enter mode allows you to select additional cells or ranges with your keyboard. |
F9 |
When a workbook is in Manual Calculation or Partial Calculation mode, F9 recalculates the workbook. |