Sunday, May 13, 2012

How to Use Macro in Excel With Examples


1. Start Excel. A new workbook is automatically opened for you.
2. Open the macro recording window. In Excel 2003, click on 'Tools > Macro > Record New Macro' and in Excel 2007 click 'View > Macros > Record Macro.'
3. Type in a meaningful name in the macro box according to what you want to record: for example 'OpenTaxFile,' or 'MakeExpenseSheet.'
4. Enter a shortcut key for your macro in the 'Shortcut key' box. For example, enter a 'O' to assign the keys 'Ctrl' and 'O' to your macro.
5. Click on 'OK.' The macro recorder is now running.
6. Perform the task that you want the macro to automate. For example, open a particular file by click on 'File > Open' in Excel 2003, or 'Office > Open' in Excel 2007 and then locate the file. You can also format a spreadsheet: for example, make an expense sheet by typing in any information that you want contained on the sheet, like mileage and business expenses.
7. Stop macro recording by clicking on 'Macro > Stop Recording.' Your macro is now ready for testing and use.

Blogger news