This example gets you started with Office Scripts in Excel. You'll learn how to record a macro and how to modify the script to get a dynamic range. You'll also learn where to find the Office Script and how to save it with your workbook.
What's the difference between Excel VBA macros and Office Scripts? Do you need to switch from VBA to Office Scripts? Find out in this detailed article. I show examples of what you can achieve with VBA and the current status of Office Scripts and explain what each is for.