Macros in Excel: Recording, Running, and Editing

Similar documents
As you probably know, Microsoft Excel is an

MODULE VI: MORE FUNCTIONS

Lesson 2. Using the Macro Recorder

Using macros enables you to repeat tasks much

Contents. Group 3 Excel Handouts 2010

BASIC MACROS IN EXCEL Presented by IGNACIO DURAN

Macros enable you to automate almost any task that you can undertake

You can record macros to automate tedious

Macros enable you to automate almost any task that you can undertake

Saving a Workbook That Contains Macros

Getting started 7. Writing macros 23

Microsoft Excel 2010 Part 2: Intermediate Excel

Microsoft MOS-EXP. Microsoft Excel 2002 Core.

Excel Main Screen. Fundamental Concepts. General Keyboard Shortcuts Open a workbook Create New Save Preview and Print Close a Workbook

Excel Advanced

Quick Guide for Excel 2015 Data Management November 2015 Training:

Reference Services Division Presents. Excel Introductory Course

Excel The primary replacement for menus and toolbars in Office Excel 2007 is the Ribbon. Designed for easy browsing, the

MODULE III: NAVIGATING AND FORMULAS

Excel Lesson 1 Microsoft Excel Basics

Lesson 1: Exploring Excel Return to the Excel 2007 web page

1. In the accompanying figure, the months were rotated by selecting the text and dragging the mouse pointer up and to the right.

EVALUATION ONLY. In this lesson, you will learn about Excel. Using LOOKUP Functions, PivotTables, and Macros EXCEL 2013 LESSON OUTLINE

Microsoft Excel - Macros Explained

Microsoft Excel Keyboard Shortcuts

Getting Started with Excel

Excel Macros, Links and Other Good Stuff

Ms excel. The Microsoft Office Button. The Quick Access Toolbar

Patricia Andrada Quick Guide Excel 2010 Data Management-July 2011 Page 1

MICROSOFT EXCEL VISUAL BASIC FOR APPLICATIONS INTRODUCTION

VBA Excel 2013/2016. VBA Visual Basic for Applications. Learner Guide

Microsoft Office Excel 2003

Excel 2003 Tutorial II

Spreadsheet Structure

6. Essential Spreadsheet Operations

SPREADSHEET (Excel 2007)

194 useful Keyboard Shortcuts for Excel Excel 2010 Shortcuts

Introduction to macros

Lesson 16: Collaborating in Excel. Return to the Excel 2007 web page

Advanced Excel for EMIS Coordinators

Day : Date : Objects : Open MS Excel program. Subject : * Open Excel application. Select : start. Choose: programs. Choose : Microsoft Office

Troubleshooting in Microsoft Excel 2002

Lesson 18 Getting Started with Excel Essentials

Excel Part 3 Textbook Addendum

COURSE CONTENT EXCEL BASIC ONE DAY

Chapter-2 Digital Data Analysis

Appendix J: Using Shortcut Keys and Shortcut Menus

Excel Pivot Tables & Macros

Excel Foundation (Step 2)

WEEK NO. 12 MICROSOFT EXCEL 2007

Microsoft Excel > Shortcut Keys > Shortcuts

Using Excel to Troubleshoot EMIS Data

6. In the last Import Wizard dialog box, click Finish. Saving Excel Data in CSV File Format

Microsoft Excel 2013 Unit 1: Spreadsheet Basics & Navigation Student Packet

Explore commands on the ribbon Each ribbon tab has groups, and each group has a set of related commands.

Gloucester County Library System EXCEL 2007

Create Electronic Presentations

Excel window. This will open the Tools menu. Select. from this list, Figure 3. This will launch a window that

Introduction to Microsoft Excel

Changing Worksheet Views

Lesson 1: Exploring Excel Return to the FastCourse Excel 2007 Level 1 book page

Switches between worksheet and menu / Ribbon. Calculates all worksheets in all open workbooks. Highlights shortcut keys of Menu and Ribbon items.

Examples: To speed up routine editing and formatting Page X of Y. If you type teh plus a space, AutoCorrect replaces it with "the.

Office 2010: New Features Course 01 - The Office 2010 Interface

Division of School Facilities

Microsoft Office Excel 2007: Basic. Course Overview. Course Length: 1 Day. Course Overview

"Excel"-erate Your Worksheets! Shortcuts and Power Tips NDSU Information Technology Services December 18, 2006

239 Excel Keyboard Shortcuts

Microsoft Excel 2013 Comments (Level 3)

Microsoft Office Excel 2010: Level 1

Excel has a powerful automation feature that lets you automate processes that you need to do repeatedly.

Read Me First (Excel 2007)

EHA Add-Ins and Keyboard Shortcuts

Module 1 - EHA Shortcut Add-in - 1

Changing Button Images in Microsoft Office

Getting Started with. Microsoft Office 2010

Les s on Objectives. Student Files Us ed

MICROSOFT EXCEL TUTORIAL HANDOUT

Rev Up to Excel 2010

ITConnect KEEPING TRACK OF YOUR EXPENSES WITH YNAB

Creating Automated Dashboard Excel 2013 Contents

Changing Worksheet Views

MICROSOFT EXCEL KEYBOARD SHORCUTS

This document describes how to use the CAP workbook with Excel It applies to version 6b of the workbook.

Getting Help in Microsoft Office

Working with Excel CHAPTER 1

Working with Excel involves two basic tasks: building a spreadsheet and then manipulating the

New Perspectives on Microsoft Excel Module 1: Getting Started with Excel

Excel 2013 Intermediate

Introduction to Microsoft Excel 2007

Work Smart: Microsoft Office 2010 User Interface

Microsoft Office Excel 2007: Basic Course 01 - Getting Started

Using Basic Formulas 4

PART 7. Getting Started with Excel

The Ribbon The Ribbon contains multiple tabs, each with several groups of commands. You can add your own tabs that contain your favorite commands.

Introduction to Microsoft Excel 2010 Quick Reference Sheet

Microsoft Office 2013 (or Office) is a collection of software programs.

Click the buttons in the interactive below to learn how to navigate and interact with slides in the

Word 2000 MICROSOFT. Level Three Advanced. Version N1.2

Excel VBA. Microsoft Excel is an extremely powerful tool that you can use to manipulate, analyze, and present data.

Transcription:

Macros in Excel: Recording, Running, and Editing This document provides instructions for creating, using, and revising macros in Microsoft Excel. Simple, powerful, and easy to customize, Excel macros can save you time and increase your productivity. Overview of Macros Are there common tasks that you perform over and over in Excel? For instance, do you often apply the same combination of formats, or do you receive data every week or month that you organize and analyze the same way every time? You can use a macro to combine all of the steps in a task into a single command. A macro records your mouse clicks and keystrokes while you work and lets you play them back later. You can use a macro to record the sequence of commands you use to perform a certain task. When you run the macro, it plays those exact commands back in the same order, causing Excel to behave just as if you had entered the commands yourself. Note for Office 2007 users: In Excel 2007, macro tools are found on the Developer tab in the Ribbon. If the Developer tab is not displayed, 1. Click the File Button. 2. Click Options. 3. In the Customize Ribbon category, under the right column (Main Tabs), check Show Developer. Macro Security As you are probably aware, macros from unknown sources can cause harm to your computer. You can change the macro security settings to control which macros run and under what circumstances when you open a workbook. Under all settings, if antivirus software that works Information Technology Services, UIS 1

with the 2007 Microsoft Office system is installed and the workbook contains macros, the workbook is scanned for known viruses before it is opened. 1. On the Developer tab, in the Code group, click Macro Security. 2. In the Macro Settings category, under Macro Settings, click the desired option. Please note that any changes you make in the Macro Settings category in Excel apply only to Excel and do not affect any other Microsoft Office program. 3. You can also access the Trust Center in the Excel Options dialog box. a. Click the File Button. b. Click Options. c. In the Trust Center category, click Trust Center Settings. d. Click the Macro Settings category. Recording a Macro Please note that navigation on the Ribbon is not captured in the recorded steps. Information Technology Services, UIS 2

1. On the Developer tab, in the Code group, click Record Macro. 2. Complete the Record Macro dialog box. a. In the Macro name box, enter a name for the macro. i. The first character of the macro name must be a letter. ii. Subsequent characters can be letters, numbers, or underscore characters. iii. Spaces cannot be used in a macro name; an underscore character works well as a word separator. iv. If you use a macro name that is also a cell reference, you may get an error message that the macro name is not valid. b. A shortcut key can be assigned to run the macro. In the Shortcut key box, type any lowercase letter or uppercase letter that you want to use. i. Please note that the shortcut key will override any existing Excel shortcut key while the workbook that contains the macro is open. ii. For a list of CTRL combination shortcut keys that are already assigned in Excel, see http://office.microsoft.com/enus/excel/hp100738481033.aspx. c. In the Store macro in list, select the workbook where you want to store the macro. i. If you want a macro to be available whenever you use Excel, select Personal Macro Workbook. Excel creates a hidden personal macro workbook (Personal.xlsb) if it does not already exist, and saves the macro in this workbook. ii. You may also choose to store the macro for use only in the current workbook or only in new workbooks. d. In the Description box, type a description of the macro, if desired. 3. Click OK to start recording and perform the actions that you want to record. Information Technology Services, UIS 3

4. When you are finished recording, on the Developer tab, click Stop Recording. You can also click the Stop Recording button on the left side of the status bar. Running a Macro 1. On the Developer tab, in the Code group, click Macros. 2. In the Macro name box, select the macro that you want to run. Then click Run. Setting Up a Macro to Run from the Quick Access Toolbar 1. Click the File Button, and then click Options. 2. Click Quick Access Toolbar, and then in the Choose commands from list, select Macros. Information Technology Services, UIS 4

3. In the list, select the macro, and then click Add. 4. To change the button image of the macro, select the macro in the list on the right, and then click Modify. 5. Under Symbol, click the button image that you want to use. To change the name of the macro that is displayed when you rest the pointer on the button, in the Display name box, type the desired name. Click OK, then click OK again to add the macro button to the Quick Access Toolbar. Information Technology Services, UIS 5

6. To run the macro, click the macro button on the Quick Access Toolbar. Assigning a Macro to an Object, Graphic, or Control Macros can also be associated with a graphic object. To run a macro by clicking an object, 1. Right-click the object, graphic, or control to which you want to assign an existing macro, and then click Assign Macro. 2. In the Macro name box, click the macro that you want to assign. Click OK. 3. Click the object to run the macro. Information Technology Services, UIS 6

Editing a Macro Macros can be edited in the Visual Basic Editor, which requires expertise with Microsoft Visual Basic. For those who are not familiar with Visual Basic, macros can be deleted and then rerecorded. To edit a macro in the Visual Basic Editor, 1. On the Developer tab, in the Code group, click Macros. 2. In the Macro name box, select the macro that you want to edit. Then click Edit. 3. The macro opens in the Visual Basic window and can now be edited. Information Technology Services, UIS 7

Deleting a Macro 1. If the macro that you want to delete is stored in the personal macro workbook (Personal.xlsb), and this workbook is hidden: a. On the View tab, in the Window group, click Unhide. b. Select PERSONAL, and then click OK. 2. On the Developer tab, in the Code group, click Macros. 3. In the Macro name box, select the macro that you want to delete and click Delete. Please note that deleting a macro does not undo its actions. Information Technology Services, UIS 8