Get started with Office Scripts. Similar to Excel VBA macros, Office Scripts allow users to automate tasks in Excel. The fundamental difference is that VBA macros are developed for desktop solutions and Office Scripts are currently only supported by Excel on the web (and in Excel for Teams).
We'll record a macro to automatically create a column chart for different data ranges. I'll also show you how you can review and edit your code in the code editor. For example how to make the fixed selected range dynamic by adjusting the recorded macro in Office Scripts. We will use variables and getSurroundingRegion to create dynamic ranges. I will also show you how to use Console.log to debug your code and how to make your chart title dynamic by using a cell reference instead of a fixed title.
Timestamps
00:00 Introduction to Office Scripts
00:38 How to Record a Macro in Office Scripts (Record Actions)
04:15 Review the Code in the Code Editor
06:00 How to Run a Macro
06:34 How to Adjust the Script for Dynamic Ranges
08:26 Dynamic Ranges with Office Scripts
09:36 How to Debug Code with Console.Log
11:03 Use Existing Scripts on Different Spreadsheets
12:09 Script Editing Options
13:16 How to Run Office Scripts in Microsoft Teams
13:47 Wrap Up
LINK to video comparing VBA to Office Scripts: Excel VBA VS Office Scripts: /watch/YTGAkuqHvODHA
LINK to Excel VBA video that records a similar macro with VBA: /watch/smD_fxN2-nA2_
Link to the complete blog post: https://www.xelplus.com/office-scripts-macros-on-the-web
★★★ My Online Excel Courses ► https://www.xelplus.com/courses/
★ Get the Official XelPlus MERCH: https://xelplus.creator-spring.com/
✉ Not sure which of my Excel courses fits best for you? Take the quiz: https://www.xelplus.com/course-quiz/
EXCEL RESOURCES I Recommend: https://www.xelplus.com/resources/
GEAR I use: https://www.xelplus.com/resources/#gear
More resources on my Amazon page: https://www.amazon.com/shop/leilagharani
Let’s connect on social:
Instagram: https://www.instagram.com/lgharani
Twitter: https://twitter.com/leilagharani
LinkedIn: https://at.linkedin.com/in/leilagharani
Note: This description contains affiliate links, which means at no additional cost to you, we will receive a small commission if you make a purchase using the links. This helps support the channel and allows us to continue to make videos like this. Thank you for your support!
#MsExcel #officescripts