Macros Excel built-in functions are great but limited Macros are a means for the user to define new functions A macro is a single command that automates.

Slides:



Advertisements
Similar presentations
Introduction to Macro Introduction to Visual Basic for Application Recording a Macro Looking at the code of Recorded Macro.
Advertisements

© Paradigm Publishing, Inc Excel 2013 Level 2 Unit 2Managing and Integrating Data and the Excel Environment Chapter 7Automating Repetitive Tasks.
Microsoft Office XP Microsoft Excel
Overview Lesson 1. Objectives Step-by-Step: Start Excel 1.Click the Start menu, and then click All Programs. 2.On the list of programs, click Microsoft.
WORKING SMART Crystal M. Thomas Henrico County DSS (804) POSSESS Central Region Member October 31, 2007.
Office 2003 Post-Advanced Concepts and Techniques M i c r o s o f t Excel Project 7 Using Macros and Visual Basic for Applications (VBA) with Excel.
Using Macros and Visual Basic for Applications (VBA) with Excel
Tutorial 7: Developing an Excel Application
Developing an Excel Application
Tutorial 8: Developing an Excel Application
1 After completing this lesson, you will be able to: Create a workbook. Understand Microsoft Excel window elements. Select cells. Enter text, numbers,
Excel Lesson 1 Microsoft Excel Basics
XP New Perspectives on Microsoft Excel 2003, Second Edition- Tutorial 8 1 Microsoft Office Excel 2003 Tutorial 8 – Developing an Excel Application.
MACROS CS1100 Computer Science and its Applications CS11001.
Excel Lesson 1 Excel Basics. Task 1  Goals  Learn about Excel  Start Excel  Explore the Excel screen  Explore the Excel workbook  Explore the worksheet.
Introduction to Microsoft Office Excel Office Button Quick Access Toolbar Ribbon Formula Bar Alphabetical Columns Numbered Rows Worksheet Tabs.
With Microsoft Excel 2010 © 2011 Pearson Education, Inc. Publishing as Prentice Hall1 PowerPoint Presentation to Accompany GO! with Microsoft ® Excel 2010.
Customizing Word Microsoft Office Word 2007 Illustrated Complete.
Microsoft Office Excel 2013 Core Microsoft Office Excel 2013 Core Courseware # 3253 Lesson 2: Constructing Cell Data.
Moving data on the worksheet Copying and Pasting Data, Slide 1Copyright © 2004, Jim Schwab, University of Texas at Austin Like other windows applications,
Macros in Excel Intro to lab 1. Macroinstructions Macro is recorded in VBA module sequence of Excel operations Macros can automate tasks in Excel Macro.
Excel Lesson 14 Creating and Using Macros Microsoft Office 2010 Advanced Cable / Morrison 1.
COMPREHENSIVE Excel Tutorial 8 Developing an Excel Application.
Copyright © 2008 Pearson Prentice Hall. All rights reserved. 1 Macros and VBA A macro is a set of instructions that tells Excel which commands to execute.
Microsoft Office Word 2013 Core Microsoft Office Word 2013 Core Courseware # 3250 Lesson 8: Using Productivity Tools.
Introduction to VBA. This is not Introduction to Excel We’re going to assume you have a basic level of familiarity with Excel If you don’t, or you need.
LOGO Chapter V Formattings 1. LOGO Overview  Conditional formatting  Working with tables  Filtering  Sorting  Freeze panes  Pivot tables  How to.
Lesson 1 – Microsoft Excel The goal of this lesson is for students to successfully explore and describe the Excel window and to create a new worksheet.
Project 9 Using Visual Basic for Applications (VBA) to Customize and Automate Excel Jason C. H. Chen, Ph.D. Professor of Management Information Systems.
Microsoft Excel 2007 © Wiley Publishing All Rights Reserved. The L Line The Express Line to Learning L Line.
Intro to Excel CSCI130-03A Instructor: Dr. Imad Rahal LAYEROrder Application SW: Excel & Access 2 High-order P.L.: Visual Basic1 Low-order P.L.: Assembly3.
VBA for Excel. What is a spreadsheet? u An Excel spreadsheet is a set of worksheets  Each worksheets is made up of rows and columns of cells  Rows are.
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. WORD 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 22 Macros.
1 CA201 Word Application Increasing Efficiency Week # 13 By Tariq Ibn Aziz Dammam Community college.
Copyright 2007, Paradigm Publishing Inc. EXCEL 2007 Chapter 7 BACKNEXTEND 7-1 LINKS TO OBJECTIVES Record & run a macro Record & run a macro Save as a macro-
Microsoft Excel Macros & Excel Solver (IENG490)
Formulas and Advanced Features R003. AO1: Use Formulas & features in your spreadsheet Invoice sheet Absolute cell reference Macros Conditional Formatting.
Introduction to VBA MGMI Aug What is VBA? VBA = Visual Basic for Application Excel’s powerful built-in programming language An event-driven.
Microsoft Excel Spreadsheet Review. Templates  Templates can be produced for the following elements:  Text and Graphics  Formatting Information – Layouts,
 Starting Excel 2003  Using Help  Workbook Management  Cursor Management  Manipulating Data  Using Formulae and Functions  Formatting Spreadsheet.
Chapter 12: Recording Macros Spreadsheet-Based Decision Support Systems Prof. Name Position (123) University Name.
Visual Basic for Applications Macro Programming For Microsoft Office.
Intro to Excel - Session 7.31 Tutorial 7 - Session 7.3 Developing an Excel Application.
© Scott/Jones Publishing, Inc. 1 Chapter 17 Using Named Cells Excel 2003, Volume 2 by Karen J. Jolly.
Chapter 9 Macros And Visual Basic For Applications.
Creating Macros in Excel Adding Automated Functionality to Excel & Office Applications.
Lesson 10 - Mail Merge and Reviewing Documents Advanced Microsoft Word.
Selecting cells on the worksheet To make a cell or range of cells the target of a command in Excel, the cells must be selected. We can select a single.
Application Software Advanced Spreadsheets "Number crunching"
A lesson approach © 2011 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft® Excel 2013.
Excel Lesson 1 Microsoft Excel Basics
Introduction to Microsoft Excel Macros COE 201- Computer Proficiency.
A lesson approach © 2011 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft® Excel 2013.
Microsoft Excel Prepared by the Academic Faculty Members of IT.
1 CA202 Spreadsheet Application Automating Repetitive Tasks with Macros Lecture # 12 Dammam Community College.
Chapter 10 Using Macros, Controls and Visual Basic for Applications (VBA) with Excel Microsoft Excel 2013.
Instructions for using this template. Remember this is Jeopardy, so where I have written “Answer” this is the prompt the students will see, and where.
McGraw-Hill/Irwin The Interactive Computing Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft Excel 2002 Using Macros Lesson.
Microsoft Excel 2007 Noris Bt. Ismail Faculty of Information and Communication Technology Tel : (Ext 8408) BCOMP0101.
Excel Tutorial 8 Developing an Excel Application
June 17, 2009 Office 2007 Tips & Tricks.
After completing this lesson, you will be able to:
Developing an Excel Application
Microsoft Excel 101.
Shelly Cashman: Microsoft Excel 2016
Microsoft Excel 2003 Illustrated Complete
Creating Macros in Excel
Lesson 1 - Automating Tasks
Microsoft Excel 2007 – Level 2
Presentation transcript:

Macros Excel built-in functions are great but limited Macros are a means for the user to define new functions A macro is a single command that automates some aspect of Excel so that you can work more efficiently with fewer errors One key or button replaces a series of actions Useful if there is a sequence of actions that occurs frequently Can be applied to an entire row or column There are two ways to create them Recorded macros (easier)‏ Writing macros using VBA (more powerful!)‏

Recorded Macros While working with recorded macros and using Visual Basic within Excel, it is helpful to have the Developer ribbon available This ribbon might not be currently visible on the main menu To add the Developer ribbon to the menu, click the Office button and then click Excel Options. In the Popular category, under “Top options for working with Excel”, check the “Show Developer tab in the Ribbon” check box and click OK. To record a macro Click on developer ribbon Within the Code group, choose Record Macro You will get a pop-up window asking for a name, description, and control key for the macro Give your macro a meaningful name, a short description, and assign it to a key for future execution

Recorded Macros Start by positioning the cursor where you want it to be before the macro begins. Once you begin recording, everything you do will be recorded, so you don’t want to position your cursor after you start recording, unless you want the macro to begin in the same cell every time it is executed After you click on ok, the window will disappear and everything you do now will be recorded as part of the macro until you click on Stop Recording in the Code group Now enter the keystrokes you want as part of your macro, pressing the stop recording button when finished When you save an Excel sheet containing a macro, make sure you save as it.xlsm – i.e. macro enabled workbook

Recorded Macros There is an icon in the Code group that allows you to set the addressing mode to relative addressing. If you don’t change this, the default mode for recorded macros is absolute referencing Macros designed with absolute addresses always use the same cells on a worksheet, in other words, if you wanted a macro that would print your name in cell A10 and your e- mail address in B10, you would use absolute addressing You could write the same macro with relative addressing to print your name in whatever cell you position the cursor in, with your address right below it Relative addressing is much more flexible, and what you will want most of the time, so make sure this button is pressed before you start recording your macro when you wish to have your macro use relative addressing

Recorded Macros Past Due Accounting Example Clear Sheet and save Record, Select cells, clear and save Fill penalty column (if overdue=yes) 10% if amount >$120 5% otherwise Check recorded macros Developer  Macros  Click on desired  Edit Complicated to read What is FormulaR1C1? Only good for small things Adding prerecorded text Executing simple formulas

Writing Macros using VBA Much closer to what we did in VB Simpler statements Begin as if you’re recording a macro and stop recording After giving it a name and control character Go and edit the macro Past Due Accounting.xls The ActiveCell and ActiveCell.offset(x,y)‏