Macros in Excel


Macros enable you to automate almost any task that you can undertake in Excel 2013. By using macro recorder from View Tab >> Macro Dropdown to record tasks that you perform routinely, you not only speed up the procedure considerably but you are assured that each step in a task is carried out same way each and every time you perform task.
To view macros choose View Tab >> Macro dropdown MACRO OPTIONS

View tab contains a Macros command button to which a dropdown menu containing the following three options.

  • View Macros: Opens the Macro dialog box where you can select a macro to run or edit.
  • Record Macro: Opens the Record Macro dialog box where you define the settings for your new macro and then start the macro recorder; this is the same as clicking the Record Macro button on the Status bar.
  • Use Relative References: Uses relative cell addresses when recording a macro, making the macro more versatile by enabling you to run it in areas of a worksheet other than the ones originally used in the macro’s recording.

CREATING MACROS

You can create macros in one of two ways:

    1. Use MS Excel’s macro recorder to record your actions as you undertake them in a worksheet
    2. Enter the instructions that you want followed in VBA code in Visual Basic Editor Now lets create a simple macro that will automate the task or making cell content Bold and apply cell color.
  • Choose View Tab>> Macro dropdown
  • Click on relative reference.
  • Click on Record Macro. It will display a dialog box, you can set shortcut key to run macro.
  • Click on OK now Macro recording will start.
  • Do the steps of action which you want to perform repeatedly. Macro will record those steps.
  • You can stop the macro recording once done with all steps.

VIEW MACRO

To Run macro select the object or place the cursor according macro you want to apply macro then click on View Macro and it will display a dialog box, select your macro to be run and click on Run. You can too edit, delete the created Macro. (Editing macro will take you to the VBA programming editor)