Lesson 1 - Automating Tasks

Slides:



Advertisements
Similar presentations
© Paradigm Publishing, Inc Excel 2013 Level 2 Unit 2Managing and Integrating Data and the Excel Environment Chapter 7Automating Repetitive Tasks.
Advertisements

WORKING SMART Crystal M. Thomas Henrico County DSS (804) POSSESS Central Region Member October 31, 2007.
Using Macros and Visual Basic for Applications (VBA) with Excel
Developing an Excel Application
Tutorial 8: Developing an Excel Application
Microsoft Office Excel 2013 Core Microsoft Office Excel 2013 Core Courseware # 3253 Lesson 8: Macros, Importing and Exporting Data.
MACROS CS1100 Computer Science and its Applications CS11001.
Excel Formatting and Editing Worksheets Microsoft Office 2010 Fundamentals 1.
Microsoft Excel 2010 Chapter 7
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.
Lecture Excel: Multiple Worksheets. Workbook and Worksheets Multiple worksheets in a single workbook. When saved, only a single workbook (XLS) is saved.
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.
1 After completing this lesson, you will be able to: Format numeric data. Adjust the size of rows and columns. Align cell content. Create and apply conditional.
COMPREHENSIVE Excel Tutorial 8 Developing an Excel Application.
Exploring Microsoft Excel 2002 Chapter 8 Chapter 8 Automating Repetitive Tasks: Macros and Visual Basic for Applications By Robert T. Grauer Maryann Barber.
Word Lesson 16 Working with Macros Microsoft Office 2010 Advanced Cable / Morrison 1.
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.
Access Tutorial 10 Automating Tasks with Macros
1 Excel Lesson 2 Formatting and Editing Worksheets Microsoft Office 2010 Fundamentals Story / Walls.
Lecture Roger Sutton CO357 Computing for Business and Accounting 13: Automation and Control (Macros and Form controls ) 1.
1 CS 106 Computing Fundamentals II Chapter 17 “Introduction To VBA” Herbert G. Mayer, PSU CS status 6/30/2013 Initial content copied verbatim from CS 106.
© 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.
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-
Introduction to VBA MGMI Aug What is VBA? VBA = Visual Basic for Application Excel’s powerful built-in programming language An event-driven.
Lesson No:9 MS-Word Tools, Mail Merge and working with Tables CHBT-01 Basic Micro process & Computer Operation.
44221: Information Systems Lecture 8 (Week 10) Spreadsheet Automation By Ian Perry
1 ADVANCED MICROSOFT WORD Lesson 16 – Customizing Features Microsoft Office 2003: Advanced.
Lecture Excel: Macros & Pivot Tables. Macros A macro is a series of commands that are stored and can be run whenever you need to perform the task.
Chapter 12: Recording Macros Spreadsheet-Based Decision Support Systems Prof. Name Position (123) University Name.
ME 142 Engineering Computation I Macros. Key Concepts Macro Overview Recording a Macro Running a Macro Editing a Macro.
Intro to Excel - Session 7.31 Tutorial 7 - Session 7.3 Developing an Excel Application.
Key Applications Module Lesson 21 — Access Essentials
Chapter 9 Macros And Visual Basic For Applications.
Creating Macros in Excel Adding Automated Functionality to Excel & Office Applications.
A lesson approach © 2011 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft® Excel 2013.
Excel Macros 1 Macros or, How to Automate Part of Your Spreadsheet or Worksheet.
1 Insert Tab. 2 Then choose a cover page you want and you can easily edit it.
Chapter 10 Using Macros, Controls and Visual Basic for Applications (VBA) with Excel Microsoft Excel 2013.
Introduction to Microsoft Excel Macros COE 201- Computer Proficiency.
Nolan Tomboulian Tomboulian.Wikispaces.com 1.
A lesson approach © 2011 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft® Excel 2013.
Microsoft PowerPoint Prepared by the Academic Faculty Members of IT.
1 Lesson 18 Getting Started with Excel Essentials Computer Literacy BASICS: A Comprehensive Guide to IC 3, 4 th Edition Morrison / Wells.
CONDITIONAL FORMATTING AND CUSTOM NUMBER FORMATS LEC 5 1.
Chapter 10 Using Macros, Controls and Visual Basic for Applications (VBA) with Excel Microsoft Excel 2013.
McGraw-Hill/Irwin The Interactive Computing Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft Excel 2002 Using Macros Lesson.
Chapter 8 Working with Trendlines, PivotTable Reports, PivotChart Reports, and Slicers Microsoft Excel 2013.
A lesson approach. 2 Insert and delete sheets and cells. 1 Copy, cut, and paste cell contents. 2 Use AutoComplete and Pick From Drop-down List. 3 Use.
Chapter 11 Enhancing an Online Form and Using Macros Microsoft Word 2013.
Excel Tutorial 8 Developing an Excel Application
June 17, 2009 Office 2007 Tips & Tricks.
Session #: 810 Excel 301: Take the Elevator to the Next floor: Macros Download session documents at: Presenters Name:
Microsoft Excel This class is “HANDS-ON” you will need to open up an excel spreadsheet and do examples as you go along. Students will be able to follow.
IE 8580 Module 4: DIY Monte Carlo Simulation
Exploring Excel Chapter 7 Automating Repetitive Tasks: Macros and
Excel: Macros & Pivot Tables
Making a JSON file.
Computer Fundamentals
After completing this lesson, you will be able to:
Microsoft Excel 2003 Illustrated Complete
Developing Editing and Formatting Skills
Creating Macros in Excel
Exploring Microsoft Excel
ME 142 Engineering Computation I
Macro.
Help..
Microsoft Excel 2007 – Level 2
Day 2: Fill Data Automatically in Worksheet Cells
Presentation transcript:

Lesson 1 - Automating Tasks Automation Lesson 1 - Automating Tasks

What is a Macro? Automate a repetitive task with a single click ⇒ Use macro recorder Programming language used to build macros is called VBA VBA = Visual Basic Application Macros can be recorded with a click of a button Macro recorder writes the code for the steps followed in Excel

Developer Tab You must show the Developer tab in the ribbon Click on File tab→ options→ customize ribbons→ check box for Developer tab The record macro button is in the “Code” group in the “Developer” tab Click on “record macro” button in the Developer ribbon to start recording Make sure you turn off the macro recorder when you are done

Absolute vs. Relative Reference Absolute macros: record absolute movement of the selected cell (uses range function) Relative macros: record relative movement of the selected cell (uses offset function) When the “Use Relative References” button is highlighted, the macro is recording relative cell references in the macro, otherwise it records absolute references

Work with Macros - Example 1 Click Record Macro Name your macro: FillDaysAbsolute Type Monday in cell A1 → copy to cell G1 → Fill series Stop recording Now clear your cells Click on “Macros” icon Select the name of the macro you just created Click run

Work with Macros - Example 2 Click on Use Relative References, then Record Macro Name your macro: FillDaysRelative Type Monday in cell A1 → copy to cell G1 → Fill series Stop recording Now clear your cells Click on “Macros” Select the name of the macro you just created click run What is the difference between the two macros we just created?

Edit a Macro Click on Macros in the Developer tab Select FillDaysRelative that we just created Click edit What you will see is the code generated by Excel for the existing macros

Edit a macro cont’ This is the VBA code for the macro FillDaysRelative we just created Copy it, paste it, then make small modifications to have another macro called FillNumberRelative that inserts number series

Assign a Button Under File/Option/Customize Ribbon Click on New Group Enter a name (ex: MyMacros) Click on the drop down “choose command from” Click on Macros Choose one of the macros listed Then click add Click Ok

Assign a Button cont’ Check the Developer tab There it is… you just added an icon for a macro you created!!

More Examples: Transpose Columns Consider a data set where records are listed vertically → Need to list them horizontally → Need to transpose columns → What if we had a lot of records

Transpose Columns: Steps Click on the first cell in the first record Click on “use relative references” Click record button Name the macro: “rearrangeRecords” Assign a shortcut key to the macro, click ok.

Transpose Columns: Steps cont’ Click on the cell with the first value: A3 CTRL-Shift-Down to select the field values of the first record CTRL-C to copy the cells Move up by one row: A2 Right click → Paste Special... → Transpose Data is copied horizontally now!! Delete that range of data delete up Go to beginning of next record Stop recording Use the shortcut key to transpose the rest of the records

Delete a Macro Shortcut Key Select the Macro Icon from the Developer tab Select the Name of Macro you want to change Select the Options Button Remove the key value stored in Shortcut key

Storing a Macro When you create a Macro you choose where it is stored Default is to store the macro in the current workbook Personal Macro Workbook allows all workbooks to have access to the macro

Access to your Macros Macros are defined within a particular workbook However, if the defined workbook is opened you can run a macro from any of your other opened workbooks So macro definitions are not limited to the workbook they are defined in

Questions?