Macros are special programs that will help you auto-execute specific tasks instead of performing manual tasks repeatedly. Visual Basic for Applications (VBA) is the programming language used to write macros. In Zoho Sheet, you can use the VBA editor to create, record, run, and manage macros.
To create a macro:
- Go to Tools > VBA Macros > Create Macro.
- In the Create Macro dialog that appears, give the preferred macro name and description.
- Once done, click Create.
- In the VBA Editor, you can write the macro code
- Once done, click on Save.
Sample macro codes to get started with:
Hide and unhide row
- Sub HideUnhideRowColumn()
- Sheets("Sheet1").Columns("A:E").Hidden = True
- Sheets("Sheet1").Columns("C:D").Hidden = False
- Sheets("Sheet1").Rows("11:15").Hidden = True
- Sheets("Sheet1").Rows("12:13").Hidden = False
- End Sub