Shakil - India : How to create macro in excel

Dear sir, I want to know the process how to create macro in excel.

Dear Shakil,


You can either 'Record a macro' or 'Write a macro'. To write a macro you will need to have command over VBA however to record a Macro you don’t need any language skill.

To Record a Macro:

Open a new excel file and on Cell A1 type “Shakil”.

Click to VIEW Ribbon (menu) in Excel 2007, you will find ‘Macros’ tab in the end, Click on it and select “Record Macro” (In previous version Go to Tools->Macros->Record a Macro).

This will pop up a window asking you to choose a name and shortcut for the macro etc. Let’s give it the name “Shakil”, Shortcut key “k” (to set the shortcut to “Ctrl+k”). Click OK button.

Now Excel will record anything you do on the worksheet, do whatever you want... eg type “=IF(A1="Shakil"," is a quick learner"," is not a quick learner")” on cell B1. Press Enter.

Now go to the Macros Tab and click “stop recording”.

Congratulations! You have successfully created the Macro named “Shakil”.

Now delete all data on the sheet. Type “Shakil” on any cell on the worksheet and then move to next cell and hit “Ctrl+k”. you will be displayed the result.

Enjoy Learning!

No comments:

Post a Comment