Sunday, March 1, 2009

Automating tasks in Excel : Using Macros in excel

If you are doing a task again a again in excel you can automate it with a Marco. If you receive a data every day/Week/Month that you analyse the same way every time, you can create series of commands in shape of excel macro and do that task by single command of running that macro and completing your task by single click of mouse.

A macro records your mouse clicks and keystrokes while you work and lets you play them back later. You can use a macro to record the sequence of commands you use to perform a certain task. When you run the macro, it plays those exact commands back in the same order, causing Excel to behave just as if you had entered the commands yourself.

Macros are easy to create: you tell Excel to start recording, perform actions as you normally do, and then tell Excel when you're done. Behind the scenes, Excel uses a programming language called Visual Basic® for Applications (VBA) to record your instructions. You don't have to know anything about programming or VBA to create and use macros that will save you time and make your work easier

Refer to Recording Excel Macro / Writing Excel Macro for further details on Macros in Excel

1 comment:

  1. Hi,
    I have a special Task today.
    I ahve a set of Pivots stored on one Worksheet,
    all filtered on teh same field.
    Now I would like to change all filters on all Pivots at once (by a Macro?)
    So, I would like to take a value from a field and update all Pivot's filters with this value...
    Mayb me VB is to rusty or I am on the wrong trail, but I cannot even imagine how to change data in Pivots with a Macro...
    Recording a macro doesn't do the job...