Favorite Tools #1 – Macros

March 2, 2012 at 3:00 pm | Posted in Tips and Tricks, Tools | Leave a comment
Tags: , ,

Nothing helps an Admin like streamlining regular repetitive or tedious tasks.  Macros in Word and Excel are necessary tools to cut your time in half using automation.
The most effective macros are well planned,  You may want to start by writing down the sequence of steps and commands you want the macro to perform.  You may even want to ‘practice’ before actually recording it to be sure your keystrokes, clicks, and commands produce the desired results.
Recording macros is easier than coding VBA from scratch and it works just as well and has the added benefit of saving time. I look at it as a way to create my own tools.  Here are some that I’ve used that worked for me.
I am assuming here that you are familiar with the Macro menu interface for recording and using them.  If not, check out the resources at the end of the article.

1. It seems inevitable that when you’re entering data into a spreadsheet that the rows and columns don’t fir the data correctly.  This macro quickly corrects that problem and gives the spreadsheet a cleaner look.
Start out with a spreadsheet that has rows and columns are too narrow or too wide.  If you don’t have one already, just purposely make one.  Here’s an example of what I used

  •   Select the cornerstone on the worksheet to select all cells (or Ctrl+A twice). Be sure that all cells remain selected.
  •   Double-click between two column headers. Be sure your cursor is positioned between the two letters and appears as a horizontal double arrow.
  •  Finally, double-click between two row headers. Be sure your cursor is positioned between the two numbers and appears as a vertical double arrow.
  • I like to finish up my Excel macros with Ctrl+Home this places your cursor in cell A1. This step is optional, but it’s always good to know where your cursor is going to end up when your macro completes. Then stop recording.

2. Another common task/problem I have in Excel is getting the spreadsheet to print out just the way I want it, usually to have it fit on one page and centered.  So I used the following macro to help me out.

  • Click on File in the Menu Bar, click on Page Setup.
  • Click on the Page tab at the top of the Page Setup window and select the orientation (portrait or landscape)
  • Click on the Margins tab at the top of the Page Setup window and set the margins (I have mine set to horizontal and center page)
  • Optional: Click on the Header/Footer tab at the top of the Page Setup window and select a header and a footer from the drop down lists
  • Click on the Sheet tab at the top of the Page Setup window. If you would like the top row of the spreadsheet to repeat on every printed page, click once in the “Rows to repeat at top” box and type $1:$1 If you prefer to have the grid lines showing, click once to place a check in the grid lines box
  • Click on OK.

Again, if you choose, click Ctrl+Home to move the cursor to A1, then stop recording.

3.  As the person who writes the most business correspondence, the name and address of the company was something written often. This macro inserts that information at the cursor position. It’s the best example of the simplest macro, typing and formatting four or five lines of text with a keystroke or a punch of a button.

  • Open a blank document using the normal template.
  • Set any formatting options you want such as font color or highlighting.
  • Type out the address as you want to appear in all documents
  • Now stop recording

Those are just a couple of examples of what I use.  I’m sure that every reader has a task that needs automation, just write down the steps, record a macro, and save time!

Now for the definitions of the day

tool
[tool]
noun
1. device for doing work
2. means to an end

sim·pli·fy
[ símpla fi ]
transitive verb
1. make something easier
2. reduce expressions to simpler terms

ef·fi·cient
[ i físh’nt ]
adjective
1. well-organized
2. able to function without waste

Other Resources

  1. Basics of recording  macros in Excel or Word
  2. Video from the ‘For Dummies” series
  3. Microsoft’s Macro Info Page

Advertisements

Leave a Comment »

RSS feed for comments on this post. TrackBack URI

So What Do You Think?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Entries and comments feeds.

%d bloggers like this: