Start learning with our library of video tutorials taught by experts. Get started

Excel 2007 Essential Training

Creating a macro


From:

Excel 2007 Essential Training

with Lorna Daly

Video: Creating a macro

Before you begin to create a macro, you want to make sure that you know exactly the steps that you want to take before you begin to record, because once you start recording, it will track every single movement, every single click, every single selection as you go through your list. So you don't want any extraneous information or any extraneous commands in there. And so you really want to do a test run, and that's what I'd done before we've come here. So, let's begin. What I want to do is I want to have a quick way of adding a header to each of the different sheets that I'm going to be working with, and I want to be able to do that online. I don't want it as a header that I only see when I'm printing out, I want it visual on my worksheets when I'm working with them.
Expand all | Collapse all
  1. 36s
    1. Welcome
      36s
  2. 10m 57s
    1. Why use a spreadsheet?
      1m 44s
    2. What's changed in Excel 2007?
      5m 37s
    3. The Ribbon
      2m 9s
    4. The Microsoft Office Button
      1m 27s
  3. 12m 10s
    1. What's on the Ribbon?
      1m 56s
    2. Making your way around the Ribbon
      2m 12s
    3. Customizing the Ribbon
      3m 8s
    4. Customizing the Microsoft Office Button
      4m 54s
  4. 16m 15s
    1. Opening old worksheets
      2m 24s
    2. Adding and deleting worksheets
      3m 18s
    3. Inserting and deleting cells
      6m 53s
    4. Freezing areas of a worksheet
      3m 40s
  5. 20m 51s
    1. Width and height
      7m 25s
    2. Numeric formats
      2m 21s
    3. Alignment of data
      3m 19s
    4. Playing with fonts
      2m 58s
    5. AutoFilter
      2m 21s
    6. Formatting as a table
      2m 27s
  6. 21m 31s
    1. Removing duplicates
      6m 1s
    2. What is Conditional Formatting?
      2m 21s
    3. Working with Conditional Formatting
      2m 14s
    4. Managing Conditional Formatting rule preferences
      2m 39s
    5. Converting text to columns
      4m 35s
    6. Data validation
      3m 41s
  7. 10m 56s
    1. Templates
      3m 45s
    2. Styles
      3m 35s
    3. AutoFormat
      3m 36s
  8. 12m 16s
    1. Excel lists have now become tables
      2m 34s
    2. Converting text to columns
      3m 11s
    3. Sorting and Grouping
      5m 9s
    4. Creating a summary report
      1m 22s
  9. 6m 44s
    1. Proofing your work
      3m 31s
    2. Providing comments on worksheets
      3m 13s
  10. 11m 43s
    1. Protecting and sharing a worksheet
      3m 57s
    2. Allowing others to edit ranges
      4m 3s
    3. Track Changes
      3m 43s
  11. 22m 43s
    1. Preparing to print
      2m 31s
    2. Print Preview
      3m 33s
    3. The Page Layout Tab
      3m 56s
    4. Page Breaks
      4m 36s
    5. The Page Layout View
      3m 54s
    6. Headers and Footers
      4m 13s
  12. 22m 34s
    1. Adding themes to your worksheet
      2m 53s
    2. Page setup options
      8m 0s
    3. Scale to Fit
      2m 26s
    4. Worksheet options
      5m 29s
    5. Inserting images
      3m 46s
  13. 3m 50s
    1. Using templates
      3m 50s
  14. 17m 48s
    1. Workbook Views
      2m 53s
    2. Hiding and Zooming
      3m 44s
    3. Window Panes
      5m 31s
    4. More screen options
      5m 40s
  15. 8m 16s
    1. Importing from Access
      2m 24s
    2. Using the Import Wizard for text files
      5m 52s
  16. 11m 23s
    1. The Find and Select button
      4m 34s
    2. Find and Replace
      2m 48s
    3. Removing duplicates
      4m 1s
  17. 17m 3s
    1. What are formulas?
      3m 20s
    2. Order of Operations
      2m 50s
    3. Relative and absolute referencing
      4m 54s
    4. The new Formula Tab
      5m 59s
  18. 17m 29s
    1. What are Functions?
      2m 57s
    2. AutoSum
      2m 47s
    3. Minimum
      3m 55s
    4. Trim
      5m 2s
    5. Left
      2m 48s
  19. 19m 51s
    1. Concatenation
      4m 10s
    2. SumIf
      4m 23s
    3. Lookup
      7m 25s
    4. What-If Analysis
      3m 53s
  20. 16m 44s
    1. Why create a chart?
      2m 12s
    2. Creating your chart
      3m 37s
    3. Modifying your chart
      6m 46s
    4. Laying out your chart
      4m 9s
  21. 17m 23s
    1. What are PivotTable reports and PivotChart reports?
      2m 32s
    2. Creating a PivotTable
      4m 47s
    3. Laying out your PivotTable
      2m 30s
    4. Designing your PivotTable
      4m 9s
    5. Creating a PivotChart
      3m 25s
  22. 8m 57s
    1. Why use macros?
      2m 14s
    2. Creating a macro
      4m 31s
    3. Macro security
      2m 12s
  23. 5m 36s
    1. Reviewing a workflow in Excel
      5m 36s
  24. 22s
    1. Conclusion
      22s

Watch this entire course now—plus get access to every course in the library. Each course includes high-quality videos taught by expert instructors.

Become a member
Please wait...
Excel 2007 Essential Training
5h 13m Beginner Jan 31, 2007

Viewers: in countries Watching now:

Like the other applications in Microsoft Office 2007, Excel 2007 boasts upgraded features and a brand-new look. In Excel 2007 Essential Training , instructor Lorna A. Daly introduces the new version in detail. The training begins with the essentials of using the program, including how and why to use a spreadsheet, how to set up and modify worksheets, and how to import and export data. Lorna then moves on to teach more advanced features, such as working with functions and macros. Exercise files accompany the tutorials.

Subjects:
Business Spreadsheets
Software:
Excel
Author:
Lorna Daly

Creating a macro

Before you begin to create a macro, you want to make sure that you know exactly the steps that you want to take before you begin to record, because once you start recording, it will track every single movement, every single click, every single selection as you go through your list. So you don't want any extraneous information or any extraneous commands in there. And so you really want to do a test run, and that's what I'd done before we've come here. So, let's begin. What I want to do is I want to have a quick way of adding a header to each of the different sheets that I'm going to be working with, and I want to be able to do that online. I don't want it as a header that I only see when I'm printing out, I want it visual on my worksheets when I'm working with them.

So, to do this quickly, I make sure that I have my Developer tab visible, and I click on it. And I'm coming over to my Record Macro area. So each set of the commands that I perform are going to be saved in the Macro, so that I can come back and play them again. I start this off by clicking on Record Macro, and the first thing I have to do is I have to name it. So, it's going to default to be named Macro1, but I may want to call it Insert title. I then identify what shortcut key am I going to use in order to activate this macro. A short cut key is some Ctrl+letter on my keyboard that it will automatically initiate this to happen.

I'm going to go down to my control, and then I'm going to type in my small letter a. Where do I want to store this macro? Well, I can store it as a Personal Macro Workbook, so it's only available to me when I'm working in my environment and my workbooks, I want to store it in a brand new workbook, or I want to store it in this workbook. And it's only visible in this particular workbook, and that's what I want to do. I can also write a description of what this particular macro's going to do and what it's anticipated end result will be. In case I do share it so that others know what we're working with.

So I've set up the original pieces for my Macro, and then I click OK. It tells me that the name that I've entered is not valid. Okay, so it can't have any spaces in my macro name up here. So included in Excel, is the ability to have it double check your information for you. So, I'm going to back up here to my Macro name, remove the space, and now I'm good to go. SO, it's now starting to do my recording because you'll see up here, it now has changed from Start Recording to Stop Recording.

So it's tracking what I'm doing. So, the first thing I want to do is I want to go up to row number 1, and I want to right-click and I want to Insert, which puts in one new row. Hit F4, which repeats that set of commands, and sets in another new row. SO I've got two new rows that I'm working with. I then select cell A1 and I type in EatCake Inventory. I enter that by clicking the checkbox, I then want to take that particular set of title, and I want to make sure it is centered across my tables. So I select the first two rows of my table, I then go back to my Home tab, and I select the Align & Center option. So that's the second under the Alignment group, that's the Merge & Center button, which is the second one towards the right of that grouping.

It puts it at the bottom of my page, so I want to align it so it's aligned in the middle of the cells. And then I also want to get a little bit fancy, and I want to change the font color to my theme color, and I'm going to make it green. So there we go. That's all of the commands that I wanted to perform. I go back to my Developer tab, and I turn off my Recording by selecting Stop Recording. Now, I want to see if this is going to work. Did it actually do what I want it to do? So, I go remove that information by just deleting my cells, go back up to cell A1 and use Ctrl+A.

Hitting those two keys automatically puts in the information that I just did. This is also available on another sheet, so if I click over to Sheet2, use Ctrl+A, there's my macro in place. That's how easy it is to do. Again, as a reminder, make sure you know what you're doing before you start, so that your macro is smooth as silk.

Find answers to the most frequently asked questions about Excel 2007 Essential Training.


Expand all | Collapse all
Please wait...
Q: When trying to apply the techniques from the “Relative and absolute referencing” video to a worksheet other than the exercise file included with the title, the formulas did not work for the entire worksheet. The formulas would only work when going through the worksheet row by row. What could be causing this to happen?
A: When trying to apply formulas to a whole workshee, here is a tip to try:

If you want to always refer to the same cell then use an absolute reference. For example, always pulling the value from cell A3 would be referenced as $A$3. This will never change no matter where you copy it to in the spreadsheet.

 If you want to reuse the same formula, but with values in different cells,  use the relative reference, A3. This way formula =A3*B3 will become =A4*B4 as you copy it down a column.
Q: In the chapter 7 video "Sorting and Grouping" at approximately 4:05, the author says to go to cell 5 on the worksheet and click on Subtotal to subtotal the grouping. My screen will not allow me to click on the Subtotal option at the top of the page. Is this an issue with my version of Excel?
A: It seems that there is an error in the instructions in this video. The video should have instructed users to do the subtotaling first, then create the table.
Q: Where can I learn more about Excel formulas?
A: Discover more on this topic by visiting Excel formulas on lynda.com.
Share a link to this course
Please wait... Please wait...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.
Upgrade now


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Upgrade now

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Excel 2007 Essential Training.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Welcome to the redesigned course page.

We’ve moved some things around, and now you can



Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

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