Modern Formula to Switch Wide Data to Long Format (Python melt)
From Leila Gharani · · 1 min

The player loads from YouTube only when you click. It uses YouTube's privacy-enhanced mode.
If the video does not play, the owner may have turned off embedding. Watch it on YouTube instead.
Description
Start with Python Foundations: https://courses.xelplus.com/l/pdp/python-in-excel-foundations (apply coupon YTPY for 60% off for a limited time)
Need to turn month columns into rows in Excel? Do not restructure the data manually. Use Python in Excel and the pandas melt function to unpivot the entire table in seconds.
In this example, we keep Region, Country, and Channel, then convert the monthly columns into two clean fields: Month and Sales.
The result is dynamic too. Add another month to the Excel Table and the output updates automatically.
Power Query can do this as well, but this method takes just one formula.
Topics covered: - Excel columns to rows - Unpivot data in Excel - Python in Excel - Pandas melt - Wide to long data transformation
500,000+ people have taken our courses so far. If you want to go deeper: 👉 https://link.xelplus.com/yt-d-all-courses
📨 Subscribe to "Between the Sheets" newsletter to stay on top of office tips and Excel hacks: https://link.xelplus.com/yt-d-newsletter
🔓 Join this channel to get access to perks: https://www.youtube.com/channel/UCJtUOos_MwJa_Ewii-R3cJA/join
📲 Let’s connect on social: Instagram: https://www.instagram.com/lgharani LinkedIn: https://www.linkedin.com/in/leilagharani
#Excel #PythonInExcel #ExcelTips