Help Documentation

Macros

Macros are a set of stored functions that can be used to automate processes that are repeated often. They are tools which can be used to perform most of the redundant tasks with relative ease.

Create Macro

A macro can be created by clicking Create Macro option present in the menu bar. There are two options by which you can create a macro. You can either write a macro or record one. Macros are written using Visual Basic.

To create a macro, follow the given steps:

  1. Click Macros > Create Macros. 

  2. The following dialog box appears.

         

   3.  Name the macro that you wish to create. You can also describe the functioning of the macro.

   4.  You can choose to either record the macro or write the code for macro using VBA editor.

Record Macro

To create a macro by recording,

  1. Click Macro > Record Macro.

  2. Name the macro and continue recording.

  3. Click on the box near Use Relative Reference if you want the cell referencing in the macro to be relative and not absolute.

  4. There is a notification  to indicate that the recording has begun.

  5. Make the changes that you wish to be recorded in the macro. They will be captured for your future use. 

  6. Click on Stop Recording  icon near the notification to stop the process.
  7. If you wish to cancel all the events, then click Cancel.

Play Macro

To play a recorded macro,

  1. Click the Macros menu > Run Macro option from the toolbar.
  2. Select the macro that you want to run.

Events

You can make use of events available to code your macro. The following are the events supported by Zoho Sheet:

Workbook Events:

1. Open

2. New Sheet

Sheet Events:

1. Change

You can code a macro in such a way that the macro is executed as the event happens, i.e., a macro under the event New Sheet will be run if a new sheet is created. 

Further help with creation of macros is available in this wiki

Assign Macros to Buttons

A macro can also be assigned to a button for easy execution. To assign a macro to a button, follow the given steps:

  1. Click Insert > Buttons.

  2. Name the button now present in the sheet.

  3. Click Assign Macro present near the button. Select an already existing macro or create a new macro to be assigned to the button created.                                                                  

Top