If you experience difficulties viewing this email. Click Here to view the Newsletter in your browser

XLAutomation Monthly Newsletter
Create your own Macro's 
by Scott Lindsay (18 March, 2009)

Macro's are a powerful tool within Excel that can allow you to perform complex tasks with the click of a button. A Macro is simply a series of commands recorded into a script that is executed when required.

Examples of Macro's that you may find useful are ....
  • Apply standard formatting to cells, specifying Font Type, Size, Colour and Background.
  • Re-format a list of Address information, to split a First and Last Name into two (2) columns.
  • Apply a two (2) step Sort routine to a set of Transactional information.
In this month's newsletter I will guide through the creation of 'Standard Formatting' Macro. Then in future newsletters we will develop each of the Macro's described above.

If you have a Macro suggestion for inclusion then Contact Us and we will endeavour to include it in a future newsletter.

Remember the draw for free consulting is being held at the end of this month.....

Standard Formatting

Let's say that you regularly apply the same formatting to cells in your worksheets. Open a new workbook and following the steps below to create your first Macro.

Step 1 - Select Tools -> Macro -> Record New Macro. You will be asked to specify a Macro Name, call this Macro 'StandardFormat' and Click OK. This will set the Macro recorder to capture all commands and actions that you take.

Step 2 - Select Format -> Cells -> Font. This will present the Format Cells Dialog Box. Now simply specify the standard formatting for your worksheets and Click OK. For this sample we have specified the following, Font - Tahoma, Style - Bold, Size - 16, Color - Blue.

Step 3 - Select Tools -> Macro -> Stop Recording. This will stop the Recorder and save your Macro for later use.

Step 4 - Now lets run the Macro and Test that it performs the actions we require. Type in some basic Text to a Cell on the first worksheet. Then select that Cell and then Select Tools -> Macros. The following Macro selection box should be displayed.

Macro Selection Dialog 

Step 5
- Select the Macro 'StandardFormat' and then select Run to execute the Macro. After Clicking Run the text selected should automatically be formatted to the format you specified in Step 2 above.

Step 6 - That's it you have now created your first Macro. You can use that Macro on a single Cell or a Range of Cells to apply formatting as required.

In next month's newsletter we will develop a more complicated Macro that will re-format some customer information. The sample Macro will split an existing field of information that contains a customers first and last name into two (2) columns containing the first and last name separately. This can be extremely useful when trying to create customer mailout lists, and the information provided needs to be re-formatted for use on labels and letters.

To download the Sample Macro Workbook and see this Macro in action Click Here.

If you have any questions or would like help in developing Macro's for your business then Contact Us and we will assist.



If you are not yet a subscriber to the XLAutomation newsletter then Click Here to subscribe and receive guidance and tools that will increase your efficiency in using Microsoft Excel, Word and Powerpoint.
Last chance to WIN 10 hours FREE  Consulting !!
By Subscribing between now and 31st March, 2009 all new Subscribers will go into the draw for the FREE Consulting.
Click Here to Subscribe.

Existing Subscribers - increase your chances by forwarding our Newsletter to your Friends and Colleagues for them to Subscribe. Click Here for more details.

Get Free Advice...
If you have a specific problem or area of Excel that you would like to see featured in next months Newsletter then let us know. Click Here to tell us what YOU need.

Latest Offers
"Free Consultation"

Take advantage of our 1 hour free on-site consultation. We guarantee to provide advice that will improve the way you currently use your Microsoft® Office software. Click Here to book a session with one of our consultants.

"Message Blaster" is here...
We have listened to our clients needs and after much anticipation released our lastest exciting new product. Message Blaster  provides "One Click" communication with your customers and contacts. Imagine a system that automatically sends SMS's and Emails, without manual intervention! Click Here to find out more about Message Blaster.

To hear what our customers have to say about Message Blaster 
Click Here

To unsubscribe from this Newsletter please Click Here
Copyright © 2008 XLAutomation All Rights Reserved