Python is Finally in Excel! 🐍


3 things we’re covering today:

  • Microsoft’s huge Python update
  • A new way to connect Power BI to Excel
  • What I learned from When the Body Says No.

🐍 Python is Coming to Excel!!!

video preview

Microsoft just dropped a bombshell: Python code, yes, real Python, can soon be your partner-in-crime within Excel spreadsheets.

Just summon the new PY() function, and voilà! You've got Python's superpowers at your fingertips. Here’s my video all about it.

This feature is currently free to test in Microsoft 365 Insiders - you’ll find Python in the Formulas tab in the Excel Ribbon.

You get a few Python libraries already ready for you to use: pandas, matplotlib, seaborn, statsmodels and NumPy. You can import other libraries as needed.

And keep in mind:

  1. You don’t need any local installation of Python. Microsoft has partnered with Anaconda so Python runs securely on the Microsoft Cloud.
  2. You can use Python code on data that’s larger than Excel rows. You just need to connect to the data via Power Query and then load to Python and work with it. If you decide to spill the results to the grid, then it needs to fit on the sheet and nothing should be blocking it, otherwise you’ll get #SPILL error.
  3. Microsoft hasn’t officially stated whether this feature will be free or not in the future. They’ve just stated that it is free to use in Insiders (Beta) version of Excel - so we don’t really know what they’re planning there.

Now, how can you use Python in Excel in practical terms?

A few ideas:

  • Design charts that were difficult if not impossible to create in Excel.
  • Find and replace text based on a pattern - here the Regular Expression library is amazing!
  • Unpivot and perform complex queries on data.

Exciting times ahead!

🤠 The Active Cell - An Excel Training Camp in Vegas!

This year's Excel & Financial Modeling Training Camp called “The Active Cell” is happening in Las Vegas, December 7th - 9th.

If you happen to be in the area or fancy a trip to Vegas, you’ll want to attend this event. It’ll be 3 days filled with insights, inspiration, and networking opportunities with Excel enthusiasts from around the globe 🌎

Unfortunately I can't be there, but 25 Excel expert colleagues like Jon Acampora, Oz Du Soleil and Diarmuid (the LeBron James of Excel) will be speaking at the event.

Secure your place and book your tickets here, using the code LEILA10 for 10% off.

🤓 Other Geeky News

📈 PowerBI - New ways to create tables in Excel connected to Power BI
Microsoft are introducing an exciting new feature that makes it easier to add PowerBI data straight to your Excel workbook! We’ve been waiting for this a long time.

Here's how to get started:

  • Insert a Connected Table without leaving Excel by following these steps: Data Ribbon → From Power Platform → From Power BI (Microsoft)
  • This launches the Power BI Datasets side pane in Excel. From there, click Insert Table to create a connected Power BI table directly in Excel.

You can then choose from a range of options to select your fields and set up filters.

📊 Excel - A New Look for the Formula Bar

Microsoft have introduced monospaced font for the Formula Bar, to improve readability, error detection, and cross-platform consistency, which is great.

Here’s how it looks in practice:

🧭 Edge - Microsoft Edge for Business Now Available

Microsoft has released a work-focused version of its Edge browser. This lets users switch between dedicated work and personal browser windows (with separate caches and storage locations), to improve security and privacy. It's available on various devices and automatically applies to those using an Entra ID.

No more crossover between work and private life!

💚 My Favorite Things

📖 Book - When the Body Says No by Gabor Mate.

I love my job and love what I do. I talked about the relief of leaving corporate and starting my own business in this article.

But I still fall into the trap of feeling that I need to do more. That whatever I’m doing isn’t enough.

When the Body Says No made me realize how important it is to pay attention to my emotional state. It helped me understand myself better and improve my overall well being. Thank you to Veronika on LinkedIn for the recommendation. There are lots of great recommendations in the comments section of this post, which I’m working through.

🚀 Power Stories

Amazing work on completing our Fast Track to Power BI course Valentina! And thank you for the great review 💚

Got a success story about using your XelPlus skills? I’d love to hear it! Hit reply to share the details, and inspire other students 😇

See you next week,

Leila

Want more?

▶️ Subscribe on YouTube

🖇️ Follow me on LinkedIn

🥇 Join 400,000+ students in our courses

📣 Want to sponsor XelPlus Weekly? Get in touch here.

This newsletter contains affiliate links, which give us a small commission on any purchase made at no cost to you. This helps us run XelPlus Weekly and bring you updates like this. Thank you for your support!

Leila Gharani - XelPlus

XelPlus is a leading online education company, providing training courses for Excel, Power BI, Finance, and Google Sheets. XelPlus’ bestselling courses are popular among financial analysts, CFO’s, and business owners. Technology is changing fast. We help our members turn confusion into confidence with every skill learnt.

Read more from Leila Gharani - XelPlus

You know the result you want. Excel just wants you to write the perfect formula to get there. And we both know that part can slow us down. Excel recently introduced Formula by Example, which generates a formula from a pattern you provide. This can be helpful. But Power Query has had such a feature for ages. Go to Add Column > Column From Examples. Provide the pattern based on values in other columns, and let it do its magic. And if you have the formula bar enabled (highly recommended), you...

Recently, I spent an hour testing something. I copied data from a PDF into Excel. You might already know what happens when you do that manually: everything from the row jams into one cell. Complete mess. So I opened Copilot in Excel and asked it to split the data for me. It immediately went to formulas. Simple ones first, then increasingly complex combinations. I tested each one. None of them split the values correctly. Here's what I should have done: skipped the manual copy entirely and used...

Someone just joined your team. They got a quick walkthrough from IT. Maybe from you. Now they're staring at a spreadsheet trying not to look lost. You see, there are a few very simple features that would make the life of an Excel newbie a whole lot easier. I cover 8 of them in this video: #1 was shocking when I discovered it. And #7 saved me days when we had to update all our group reporting files after a rebrand. If you already know your way around Excel, be honest: did you know all 8?...