New Feature: Playlist Center! Pick a topic and let our playlists guide the way.

Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Definition and examples

From: Excel 2013 Essential Training

Video: Definition and examples

When you find yourself repeating certain command sequences in Excel, sometimes the thought is, here I go again, same thing all over. Do I have to go through those same six steps, those same eight steps? Ultimately the answer is no. There is a feature in Excel called a Macro. A Macro is simply the ability to take a single step that encompasses many, many steps. Let's start with just a small idea. You're the manager of an HR group, and what you do occasionally is you review this data like what we're seeing here.

Definition and examples

When you find yourself repeating certain command sequences in Excel, sometimes the thought is, here I go again, same thing all over. Do I have to go through those same six steps, those same eight steps? Ultimately the answer is no. There is a feature in Excel called a Macro. A Macro is simply the ability to take a single step that encompasses many, many steps. Let's start with just a small idea. You're the manager of an HR group, and what you do occasionally is you review this data like what we're seeing here.

And when you flag a cell because you think it's incorrect or needs adjustment, what you do, and admittedly this might be overkill. You go to the Home tab; you provide a color background, let's say yellow here. You might make the font red; make it bold and going overboard a bit, maybe even going into Borders, Thick Box Border. It's just to illustrate the idea that we've taken four or five actions here and we like that look. And we like to use it elsewhere too. Now if it's nearby, we could copy the format, that might not take too long, but we might be a few hundred rows away at one time or another.

Wouldn't it be great if we could simply hit a keystroke shortcut, or how about a button up in the Quick Access toolbar at the top of the screen that would achieve that same objective. Well, we could create what's called a Macro to achieve that effect. Let's take some other just small examples at least at first. When someone leaves this organization, what you usually do is not delete the record, because you want to hold onto it for while but maybe you do like to indicate that someone has left simply by applying strikethrough. And you can get to strikethrough a number of ways, but invariably what it means is after selecting the data, you can go to the Font tab and click the dialog box launcher, or you might press Ctrl+1.

In either case, you'll end at Format Cells, probably on the Font tab and there's a choice called Strikethrough, you click OK, there it is. Now a bit later, you might discover there's actually keystroke shortcut for that, its Ctrl+5. Now we don't call that a Macro, but in a certain sense it is. It's a single action. And in this case, it applies strikethrough or removes it. In a certain sense we can also make the case for saying that nearly every button in the ribbon menu system is like a little macro.

If you didn't know how to make a cell bold, you might have to go, by way of the dialog box launcher or by Right-Clicking on the cell possibly. Going to Format Cells, Font tab if it's not already selected and there's Bold. Probably almost nobody does this, most people learn on day one of Excel, there's a button up there, B, that too is like a macro, we just don't call those macros but they represent the concept of a single action that the takes the place of many actions.

And let's think a little bit larger here, what if this list of some 700 rows or so is within a dynamic organization and there's a lot of growth here, a lot of change, people come and go. What if it's up to you, two or three times a week to provide updated lists for a number of people? And one of the things you might do is sort this by department and then, print three copies. And then maybe you sort it by employee name and print a few more copies. And another thing you do in that same sequence is apply a filter to show only the hourly people, and you print that list and send it off to the interested people.

And you might imagine a few other sequences like that. Maybe sorted in different way and printed, or maybe you apply subtotals and collapse that list and copy it and paste it; and you can imagine any number of different things that you might be doing with a list like this. Now you probably didn't really time how long that would have taken, but maybe it takes you ten or twelve minutes and you do that two or three times a week. If you remember the steps or if you've written them down, if it's pretty clear to you what those steps are, you could then activate or turn on what's called a macro recorder.

And in the process go through all the steps that you've gone through manually. And thereafter, since the macro will be saved, you can simply start the process by clicking a keystroke shortcut and maybe that ten or 15-minute process takes a half a minute. Printing might take a little bit of time but otherwise it's extremely fast. And the more you know about the macro concept, the more you're tuned into the idea that automating certain aspects of repetitious work is going to be helpful to you. Here's another example.

There's a PricingSheet in this workbook. It would be handy if we knew where the formulas are, and there are couple shortcuts for that already. If you click on a single cell anywhere in this worksheet, on the Home tab you could go to the Find & Select button on the right and choose Formulas, and all the formula cells are highlighted. Now if you always want to apply color when you do that will involve a few more steps, maybe you'll click this drop-arrow here and you got a particular color you like use there, fine.

That's only a few steps, but that too could be automated. Imagine in any worksheet at any time if you said, I'd like to know which cells have formulas. Hit a keystroke shortcut and suddenly we'd see these cells highlighted. Now admittedly, the steps here aren't that many and you got to go to the Home tab, you got to go to Find & Select, you've got to select Formulas, and then you got click here and so on. We're not really counting the steps, but it's interesting how we do find even four and five step sequences sometimes just a little annoying.

A keystroke shortcut would be great here. A companion to this would take substantially longer. Suppose you say, I'd like to highlight just the cells that have pure numbers, not the ones with formulas, but the one with numbers. Process here as you might guess starts in that same location, Find & Select and then, this time Go To Special, not quite so obvious. And here, we can choose Constants, but then we would want to uncheck the box for Text, Logical, Errors, and click OK.

And here too, maybe apply a different color. Now, in no way am I saying this is a shortcut that everybody needs. In other words you have to identify what repetitious actions that you use frequently are the ones that you found annoying or the ones that you'd really like to speed up. I think for some people, these would be really helpful. If you're a worksheet troubleshooting kind of person, if you find yourself often doing that sort of thing, these steps here if turned into macros could really save you a lot of time. So the idea of a macro will vary widely depending upon whose thinking about what those shortcuts are, what potential shortcuts are really needed.

There's so many different ways to use Excel, but the idea of setting up a process to record our actions, so that we can then get to them quickly in the future is called a macro and it's an incredibly powerful tool for Excel users.

Show transcript

This video is part of

Image for Excel 2013 Essential Training
Excel 2013 Essential Training

82 video lessons · 64729 viewers

Dennis Taylor
Author

 
Expand all | Collapse all
  1. 1m 6s
    1. Welcome
      43s
    2. Using the exercise files
      23s
  2. 29m 37s
    1. What is Excel used for?
      1m 49s
    2. Using the menu system
      4m 30s
    3. The Quick Access Toolbar
      4m 41s
    4. The structure of a worksheet or workbook
      3m 41s
    5. Using the Formula bar
      1m 43s
    6. Using the Status bar
      2m 24s
    7. Navigation and mouse pointers
      2m 20s
    8. Shortcut menus and the Mini toolbar
      3m 24s
    9. Using the built-in help
      2m 54s
    10. Creating new files
      2m 11s
  3. 24m 1s
    1. Exploring data entry and editing techniques
      4m 41s
    2. Entering data with AutoFill
      4m 6s
    3. Working with dates and times
      3m 32s
    4. Using Undo and Redo
      4m 50s
    5. Adding comments
      2m 55s
    6. Using Save or Save As
      3m 57s
  4. 30m 7s
    1. Creating simple formulas: Totals and averages
      5m 25s
    2. Copying a formula for adjacent cells
      2m 54s
    3. Calculating year-to-date profits
      3m 9s
    4. Creating a percentage-increase formula
      4m 7s
    5. Working with relative, absolute, and mixed references
      4m 7s
    6. Using SUM and AVERAGE
      3m 25s
    7. Using other common functions
      7m 0s
  5. 46m 7s
    1. Exploring font styles and effects
      4m 7s
    2. Adjusting row heights and column widths
      3m 37s
    3. Working with alignment and Wrap Text
      4m 2s
    4. Designing borders
      3m 26s
    5. Exploring numeric and special formatting
      5m 36s
    6. Formatting numbers and dates
      4m 31s
    7. Conditional formatting
      4m 21s
    8. Creating and using tables
      9m 59s
    9. Inserting shapes, arrows, and other visual features
      6m 28s
  6. 20m 40s
    1. Inserting and deleting rows and columns
      4m 52s
    2. Hiding and unhiding rows and columns
      4m 2s
    3. Moving, copying, and inserting data
      5m 42s
    4. Finding and replacing data
      6m 4s
  7. 17m 51s
    1. Exploring the Page Layout tab and view
      7m 20s
    2. Previewing page breaks
      4m 56s
    3. Working with Page Setup and printing controls
      5m 35s
  8. 30m 30s
    1. Creating charts
      4m 36s
    2. Exploring chart types
      7m 47s
    3. Formatting charts
      5m 42s
    4. Working with axes, labels, gridlines, and other chart elements
      5m 35s
    5. Creating in-cell charts with sparklines
      6m 50s
  9. 12m 49s
    1. Freezing and unfreezing panes
      2m 39s
    2. Splitting screens horizontally and vertically
      4m 48s
    3. Showing necessary information with the Outlining feature
      5m 22s
  10. 23m 0s
    1. Displaying multiple worksheets and workbooks
      4m 17s
    2. Renaming, inserting, and deleting sheets
      2m 23s
    3. Moving, copying, and grouping sheets
      3m 39s
    4. Using formulas to link worksheets and workbooks
      6m 1s
    5. Locating and maintaining links
      6m 40s
  11. 20m 25s
    1. Using IF functions and relational operators
      3m 43s
    2. Getting approximate table data with the VLOOKUP function
      7m 6s
    3. Getting exact table data with the VLOOKUP function
      4m 42s
    4. Using the COUNTIF family of functions
      4m 54s
  12. 23m 50s
    1. Unlocking cells and protecting worksheets
      7m 50s
    2. Protecting workbooks
      2m 40s
    3. Assigning passwords to workbooks
      4m 41s
    4. Sharing workbooks
      4m 7s
    5. Tracking changes
      4m 32s
  13. 28m 32s
    1. Sorting data
      6m 9s
    2. Inserting subtotals in a sorted list
      8m 25s
    3. Using filters
      6m 16s
    4. Splitting data into multiple columns
      5m 4s
    5. Removing duplicate records
      2m 38s
  14. 35m 2s
    1. Creating PivotTables
      8m 36s
    2. Manipulating PivotTable data
      9m 47s
    3. Grouping by date and time
      6m 0s
    4. Grouping by other factors
      2m 33s
    5. Using slicers to clarify and manipulate fields
      4m 7s
    6. Using PivotCharts
      3m 59s
  15. 23m 29s
    1. Using Goal Seek
      6m 8s
    2. Using Solver
      6m 34s
    3. Using Scenario Manager
      6m 11s
    4. Using Data Tables
      4m 36s
  16. 24m 31s
    1. Definition and examples
      6m 48s
    2. Creating a simple macro
      7m 0s
    3. Running a macro
      10m 43s
  17. 29s
    1. Next steps
      29s

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold

Are you sure you want to delete this note?

No

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.