You can convert macros in Microsoft Excel spreadsheets to Google Sheets by re-creating them using Google Apps Script. Apps Script powers macros in Sheets, just like Microsoft Visual Basic for Applications does for Excel. your saved macro. You can also run your macro by using its keyboard shortcut.
Does Excel VBA work in Google Sheets?
Google Sheets does not support VBA -- which stands for Visual Basic for Applications, a Microsoft language derived from Visual Basic. What Sheets does support is Javascript functions working just as macros.
How do macros work in Google Sheets?
Google Sheets Macros are small programs you create inside of Google Sheets without needing to write any code. They're used to automate repetitive tasks. They work by recording your actions as you do something and saving these actions as a “recipe” that you can re-use again with a single click.