Have you ever wondered how to go about creating an Excel macro? A macro can be a really effective way to automate actions you carry out repeatedly and can be used in a great variety of situations. This article describes how to create a macro in Excel 2010 and summarises practical examples and more can be learnt on one of our bespoke Excel training courses.

An Excel macro can be used for lots of things. For example you could use a macro to locate the cursor in cell A1 and enter today's date, or you could open a particular file, create a table and autosum all the data, or with several files open you could choose the Arrange All view and show all the files vertically tiles. These examples are simply the result of Excel actions and you could do lots more with macros, for example copy data from one file to another, carry out particular calculations, or create a pivot table from an existing table of data.

To work with macros in Excel 2010 it's useful to display the Developer tab as this gives you more macro commands than available on the Review tab. To do this, choose the File Tab, then Option. In the Excel Options panel choose Customize Ribbon and in the right hand side of the display tick the box for the Developer Tab. Doing this will turn on the Developer tab.Then click OK to complete. Now we can create our first macro.

If you are going to create macro, it can be useful to practice the actions first. So place the cursor anywhere in the worksheet, but not in cell A1. Now we'll carry out the practice run. Choose CTRL+Home to move the cursor to cell A1. Now type in =TODAY() and press Enter. Today's date will appear in cell A1. That's the practice finished, so you can delete the contents of cell A1 and place the cursor in any other cell, and then record the real macro.

To actually record the macro we will give the macro a name, and also assign it to an optional CTRL key combination. Doing this lets us run the macro by name or by pressing the assigned keyboard combination. So to begin, in the Developer tab choose Record Macro. Give the macro the name, for example MYDATE1, assign the CTRL key + t, ensure THIS WORKBOOK is selected as the saved location, then click OK to start recording.

If you look carefully in the light blue status bar at the bottom of the screen, on the left hand side, you'll see a small blue button has appeared. This indicates a macro is being recorded. Now choose CTRL+Home and the cursor again goes to cell A1. Now type =TODAY() and press Enter. Today's date appears again in cell A1. That's the macro finished so we'll stop recording. To do this click once on the blue button on the lower status bar. Alternatively you can click on STOP RECORDING in the Developer Tab.

Now we'll test the macro. However first, delete the contents of cell A1 and place the cursor anywhere else on the worksheet. Then type CTRL+t and your macro should run. Alternatively in the Developer Tab you can click MACROS. In the Macros panel you'll see your macro. Ensure it is selected, then click RUN.

So creating a macro in Excel 2010 is straightforward and can be used to automate actions you carry out more than once. A macro can be assigned to a CTRL key combination with either an uppercase or lowercase letter. If you're interested in learning more about Excel 2010 macros, consider attending a training course. This can be a very effective way to really boost your Excel skills.