Alt M Z P on Mac: Insert Python in Excel

To run Insert Python with Alt M Z P in Excel on a Mac, install LightningXL, tap Option, then type M, Z, P. The same keys as Windows, with the same result.

Option
MFormulas
Z
PInsert Python

Step by step

  1. Install LightningXL

    Download LightningXL, then follow the instructions. Setup takes about two minutes.

  2. Select what to act on

    Click a cell, or select the range the command should apply to.

  3. Tap Option, then type M Z P

    Tap on its own to show the key tips, then M for Formulas, Z P for Insert Python.

What Alt M Z P does

Insert Python sits on the Formulas tab of the Excel ribbon. On Windows, Alt M Z P runs it from the keyboard. Excel for Mac has the same ribbon but no Alt key, so without LightningXL you click through Formulas › Insert Python instead.

Related shortcuts

The rest of the Formulas tab in Excel:

Every Windows shortcut you know, on your Mac

Alt key tips for the Excel, Word and PowerPoint ribbons, plus 100+ of the most common modeling shortcuts.

Coming Soon

7-day free trial · No card required