Computer Science Lab Exercise 2

Size: px
Start display at page:

Download "Computer Science Lab Exercise 2"

Transcription

1 osc 127 Lab 2 1 of 10 Computer Science Lab Exercise 2 Excel User-Defined Functions - Repetition Statements (pdf) During this lab you will review and practice the concepts that you learned last week as well as learn a few more Visual Basic statements that will increase your ability to create powerful Excel user-defined functions (UDFs). Review We saw during the last lab that in the case of simple calculations, the tools you have always used with Excel are sufficient to develop your spreadsheets. However, when you build spreadsheets with complicated calculations Excel provides user-defined functions (UDFs), a powerful tool that allows you to build your own customized functions. Here are a few of the key things that were learned last week: Visual Basic (VB) is a computer programming language used to code (specify) what a UDF does and returns. UDFs are written within a Visual Basic Module (VB Module) within the Visual Basic Editor (VB Editor). To toggle between a spreadsheet and the VB editor press, alt-f11. UDFs, just like Excel's built-in functions, return a value to the spreadsheet formula that calls the function. UDFs can have arguments that are passed into the function when they are called. These arguments are called actual parameters in the Excel spreadsheet formula (for example, B4 and C4 in the formula =PROFIT(B4,C4)). In the VB Module that defines the UDF, these arguments are called formal parameters and are specified in the function header for the UDF. For example, in the function header, Function PROFIT(revenue, expenses), revenue and expenses are the formal parameters that correspond to the actual parameters, B4 and C4 respectively. In this example, the values contained in cells B4 and C4 would be assigned to the variables revenue and expenses, respectively, within the UDF. VB code often contains a statement that looks something like "sum = sales + x * ". Although this statement looks just like an equation we might see in math where "=" is expressing the equivalence of the right side to the left side, this statement is an assignment statement. The "=" in VB is the assignment operator and means that the value calculated on the right side of the "=" should be assigned to the variable on the left side of the "=". We should regard variables as named storage locations for data. In this example, the variable sum would store the calculated value. The VB statements that comprise a UDF are executed in a top-to-bottom order until a value is assigned to a variable that has the same name as the function. This value that is assigned, is the return value for the UDF, and the UDF immediately returns to the calling Excel formula. Review Exercise: Create a temperature converter UDF called TEMPCONV. In this example, we will create a temperature converter UDF to convert a temperature in degrees Fahrenheit to degrees Celsius. The formula for such a conversion is straightforward, and probably wouldn't warrant the use of a UDF. However, during this example, we'll expand the functionality of TEMPCONV so that it indeed becomes a complicated function. Follow the instructions indicated below to build the first version of TEMPCONV. 1. Open Excel Adjust the security settings for your file. Select File, then Options to open the Excel Options dialog box. Then select Trust Center, then Trust Center Settings to open the Trust Center dialog box. Then select Macro Settings and then enable all macros and check Trust access to the VBA project object model. Click OK to close the Trust Center dialog box and then click OK again to close the Excel Options dialog box.

2 CoSc 127 Lab 2 2 of Open an Excel workbook and enter the data shown in the table below. Save the file as a Macro-Enabled Workbook using Name-Lab2.xlsm as the filename. Use your first name and last initial in place of Name. For example, I would save this file as AlanK-Lab2.xlsm. 3. Next, we will start the process of creating the UDF. Open the VB Editor by pressing alt-f11 (recall that alt-f11 is a toggle to move back and forth between your spreadsheet and the VB Editor). The VB Editor window will look something like this: 4. To open a VB Module, select Module from the Insert menu:

3 CoSc 127 Lab 2 3 of 10 A VB Module will appear in the right side of the window: 5. Remember that it is within this white area on the right that we will create the user-defined function. Now that we have a VB module open, we can code the TEMPCONV UDF. Type the VB code for the TEMPCONV function into the VB Module as shown below: 6. Now lets try using our UDF. Return to your spreadsheet by selecting it from the taskbar or by pressing alt-f11. Enter the formula shown in cell B5.

4 osc 127 Lab 2 4 of Press enter and copy the formula to B6:B13: If you made a mistake and fixed it, you will need to ask Excel to recalculate the spreadsheet. Recall that you can do this by pressing F9. Change the number of decimal places to 2 and Save your file. Exercise: Adding functionality to a UDF Let's add some additional functionality to our UDF. For example, it would be useful if our UDF could also convert from Celsius to Fahrenheit as well as Fahrenheit to Celsius. However, adding such functionality poses a problem for the UDF. Specifically, how does the UDF know which conversion the user wants? Somehow some information needs to be passed into the UDF so that the UDF knows which formula to perform. A reasonable approach would be to add another formal parameter to the UDF. The second parameter would allow the user to indicate which conversion should be done. For example, suppose a user wants to convert 50 degrees Celsius to Fahrenheit, the user could call the function by indicating =TEMPCONV(50,1) in the Excel formula. If the user wants to convert 50 degrees Fahrenheit to Celsius, the user could call the function by indicating =TEMPCONV(50,0) in the Excel formula. The UDF could now distinguish which conversion is desired, by testing the value of the second formal parameter. Follow the steps below to add this extra functionality. 1. Add columns to your spreadsheet as shown below:

5 CoSc 127 Lab 2 5 of Return to the VB Module by pressing alt-f11. Modify the TEMPCONV function as shown below. Here we see that we use the If..Then..Else VB statement to test the value of the formal parameter conv. If the actual parameter associated with conv is 0, then the condition in the If..Then..Else statement will be true, causing the first calculation to be the one that is returned. If conv is not equal to 0, then the second calculation will be returned. 3. Return to your spreadsheet and enter the formula shown below into cell E5. 4. Pressing enter gives this result:

6 CoSc 127 Lab 2 6 of 10 Although we get the expected value in cell E5, the values in cells B5:B13 now indicate "#VALUE!". Unfortunately, what we inadvertently did was change the structure of the TEMPCONV UDF - it now takes two actual parameters. As a result, we are no longer using the UDF correctly in B5:B13. When we pressed enter, we entered a new formula into a cell, so Excel recalculated the spreadsheet and noticed that there is no function called TEMPCONV that takes just a single parameter. 5. To fix the problem with the initial conversion, enter the formula shown below into B5. Press enter and copy B5 to B6:B13. Also copy E5 to E6:E13. Your spreadsheet will now give the expected values as the formulas are now calling the TEMPCONV UDF correctly. 6. Save your spreadsheet.

7 osc 127 Lab 2 7 of 10 Visual Basic Statements for Performing Repetition Recall from last week that a computer program is a sequence of programming statements that exactly follow the specific structure (or syntax) of a programming language. These statements ask the computer (or application) to do something useful. By default the program statements that you create in VB are executed using so-called sequential flow of control. There are three flows of control. The first is sequential flow, which means that each statement is executed immediately after the previous statement (usually located above the statement in a text editor). The second flow of control is called conditional flow. Conditional flow occurs when a mechanism provides the ability to execute a statement only under certain conditions. An example of such a mechanism is any one of the flavours of the If..Then statements. The third flow of control is called repetition flow. Repetition flow occurs when a mechanism provides the ability to execute a set of statements repeatedly. Programming languages often provide multiple ways of repeating a set of statements. We will examine one of the ways provided by VB. A statement that facilitates the repetition of statements is often referred to as a loop. Experimenting with Loops No study of computer programming would be complete without discussing at least one mechanism for repeating statements. Although you will find conditional flow to be the most used flow of control (i.e. If..Then statements) there are certain things that are simplified with the ability to perform repetition. In fact, there are some things we simply cannot do without a mechanism for repeating statements. The following exercises will give us a little practice with incorporating a loop into a UDF. Exercise: Calculating the Sum of a Sequence of Numbers In Visual Basic, the so-called Do While statement is used to repeat a set of statements. The syntax below describes the Do While statement. Do While condition Put statements to be executed if condition is true, here Loop When program execution arrives at this statement the condition is tested. If the condition is true, the statements between the Do While condition line and the Loop line are executed repeatedly until the condition becomes false. Once the condition becomes false the flow of control returns to sequential flow immediately following the Loop line. For example, suppose these statements appeared within the loop: then statements are executed as follows: Is condition true? (If yes, start executing the next line. If no, start executing immediately after the Loop line.) Is condition true? (If yes, start executing the next line. If no, start executing immediately after the Loop line.)

8 CoSc 127 Lab 2 8 of 10 Is condition true? (If yes, start executing the next line. If no, start executing immediately after the Loop line.)... Is condition true? (If yes, start executing the next line. If no, start executing immediately after the Loop line.) Is condition true? (If yes, start executing the next line. If no, start executing immediately after the Loop line.) Provided that one of the three statements changes the condition, eventually the answer to the question "Is condition true?" will be no and the loop will terminate. This helps to highlight why the term loop is often used in this context. The execution within a loop proceeds down, line-by-line, until the keyword Loop is executed, which says return to to the start of the loop and retest the condition. Let's create a UDF, called SUMMER, to calculate the sum of numbers between two user-specified numbers. This UDF will calculate all numbers from one specified parameter to another. For example, if the user called the function using =SUMMER(15,22) this function would return the result of the expression As the user can give any two numbers as actual parameters we cannot know how many numbers should be in the expression. As a result, we will use a loop rather than trying (in vane) to construct a single lengthy expression If not already open, open your Name-Lab2.xlsm Excel workbook. Press alt-f11 to toggle to the VB Editor window. Open a VB Module and enter the UDF code shown here: Let's examine this code. The first and last lines follow the familiar structure, with low and high being two formal parameters. The second line Sum = 0 is an assignment statement assigning the value of 0 to the variable Sum. The variable Sum is going to act like an adding machine. Each cycle through the loop, we will be adding another value to Sum. Sum will be accumulating the values. The third line is the start of the loop and sets up the loop by specifying the condition under which the contents of the loop should be executed.

9 CoSc 127 Lab 2 9 of 10 Lines four and five are the contents of the loop. These lines will be executed once for every cycle of the loop. Line four, Sum = Sum + low, increases the value of Sum by whatever value is stored in low. Line five, low = low +1, increases the value stored in variable low by 1. Repeating these two statements will have the effect of adding the values low, low+1, low+2, low+3,..., high. As the variable low is increased by 1 after each cycle through the loop, eventually it will exceed the value stored in the variable high. That is the cycle at which flow control jumps out of the loop. Line six, Loop, specifies the bottom of the loop - the statement at which control of execution is automatically returned to the top of the loop (to retest the condition, low <= high, to see if the contents of the loop should be executed again). Line seven, SUMMER = Sum, is the return statement. Recall that when a value is assigned to a variable with the same name as the function, that value represents the value that is returned from the function. Once a return value is assigned, the function stops executing. 3. Return to your spreadsheet and try using the formula: 4. Pressing enter here yields this result: This is the expected result as equals Save your workbook. Exercises: Try adding a function very similar to SUMMER called AlternateSUMMER to your Name-Lab2.xls file that sums every other number between two user-specified numbers. For example, if a user enters the formula =AlternateSUMMER(10,15), the function should return the result of the expression If a user enters the formula =AlternateSUMMER(10,16), the function should return the result of the expression If a user enters the formula =AlternateSUMMER(9,16), the function should return the result of the expression After examining the original code, you will see that your new function is almost identical to the original function. Besides changing the last line to "AlternateSummer = sum", there is just one line within the function that will need to change. Experiment with this function to see if you can find it. Add another function to your Name-Lab2.xls file called flowconv. This function should be able to convert a flow specified in cubic feet per second (cfs) to cubic metres per second (cms), and also convert from cms to cfs. Follow the technique that we used in the earlier part of the lab to create this function. For your reference, 1 cubic foot/second is equal to cubic meters/second. Submitting your Work

10 When you complete these exercises call your instructor over to check your work. If your instructor asks, submit your work through Blackboard . CoSc 127 Lab 2 10 of 10

Computer Science Lab Exercise 1

Computer Science Lab Exercise 1 1 of 10 Computer Science 127 - Lab Exercise 1 Introduction to Excel User-Defined Functions (pdf) During this lab you will experiment with creating Excel user-defined functions (UDFs). Background We use

More information

Optimization in One Variable Using Solver

Optimization in One Variable Using Solver Chapter 11 Optimization in One Variable Using Solver This chapter will illustrate the use of an Excel tool called Solver to solve optimization problems from calculus. To check that your installation of

More information

You can record macros to automate tedious

You can record macros to automate tedious Introduction to Macros You can record macros to automate tedious and repetitive tasks in Excel without writing programming code directly. Macros are efficiency tools that enable you to perform repetitive

More information

Introduction to macros

Introduction to macros L E S S O N 7 Introduction to macros Suggested teaching time 30-40 minutes Lesson objectives To understand the basics of creating Visual Basic for Applications modules in Excel, you will: a b c Run existing

More information

Microsoft Excel 2007 Macros and VBA

Microsoft Excel 2007 Macros and VBA Microsoft Excel 2007 Macros and VBA With the introduction of Excel 2007 Microsoft made a number of changes to the way macros and VBA are approached. This document outlines these special features of Excel

More information

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

VBA Excel 2013/2016. VBA Visual Basic for Applications. Learner Guide VBA Visual Basic for Applications Learner Guide 1 Table of Contents SECTION 1 WORKING WITH MACROS...5 WORKING WITH MACROS...6 About Excel macros...6 Opening Excel (using Windows 7 or 10)...6 Recognizing

More information

Validate and Protect Data

Validate and Protect Data Validate and Protect Data Chapter 8 Objectives In this section you will Restrict Data Entry to a Cell Test the Data Entered in a Cell for Validity Display Instructions for Data Entry Display Error Messages

More information

Extending the Unit Converter

Extending the Unit Converter Extending the Unit Converter You wrote a unit converter previously that converted the values in selected cells from degrees Celsius to degrees Fahrenheit. You could write separate macros to do different

More information

Functions in Excel. Structure of a function: Basic Mathematical Functions. Arithmetic operators: Comparison Operators:

Functions in Excel. Structure of a function: Basic Mathematical Functions. Arithmetic operators: Comparison Operators: Page1 Functions in Excel Formulas (functions) are equations that perform calculations on values in your spreadsheet. A formula always starts with an equal sign (=). Example: =5+2*7 This formula multiples

More information

M i c r o s o f t E x c e l A d v a n c e d. Microsoft Excel 2010 Advanced

M i c r o s o f t E x c e l A d v a n c e d. Microsoft Excel 2010 Advanced Microsoft Excel 2010 Advanced 0 Working with Rows, Columns, Formulas and Charts Formulas A formula is an equation that performs a calculation. Like a calculator, Excel can execute formulas that add, subtract,

More information

INTRODUCTION TO MICROSOFT EXCEL: DATA ENTRY AND FORMULAS

INTRODUCTION TO MICROSOFT EXCEL: DATA ENTRY AND FORMULAS P a g e 1 INTRODUCTION TO MICROSOFT EXCEL: DATA ENTRY AND FORMULAS MARGERT E HEGGAN FREE PUBLIC LIBRARY SECTION ONE: WHAT IS MICROSOFT EXCEL MICROSOFT EXCEL is a SPREADSHEET program used for organizing

More information

DOING MORE WITH EXCEL: MICROSOFT OFFICE 2013

DOING MORE WITH EXCEL: MICROSOFT OFFICE 2013 DOING MORE WITH EXCEL: MICROSOFT OFFICE 2013 GETTING STARTED PAGE 02 Prerequisites What You Will Learn MORE TASKS IN MICROSOFT EXCEL PAGE 03 Cutting, Copying, and Pasting Data Basic Formulas Filling Data

More information

Workbook Also called a spreadsheet, the Workbook is a unique file created by Excel. Title bar

Workbook Also called a spreadsheet, the Workbook is a unique file created by Excel. Title bar Microsoft Excel 2007 is a spreadsheet application in the Microsoft Office Suite. A spreadsheet is an accounting program for the computer. Spreadsheets are primarily used to work with numbers and text.

More information

Microsoft Office Illustrated. Getting Started with Excel 2007

Microsoft Office Illustrated. Getting Started with Excel 2007 Microsoft Office 2007- Illustrated Getting Started with Excel 2007 Objectives Understand spreadsheet software Tour the Excel 2007 window Understand formulas Enter labels and values and use AutoSum Objectives

More information

COPYRIGHTED MATERIAL. Making Excel More Efficient

COPYRIGHTED MATERIAL. Making Excel More Efficient Making Excel More Efficient If you find yourself spending a major part of your day working with Excel, you can make those chores go faster and so make your overall work life more productive by making Excel

More information

Creating a Spreadsheet by Using Excel

Creating a Spreadsheet by Using Excel The Excel window...40 Viewing worksheets...41 Entering data...41 Change the cell data format...42 Select cells...42 Move or copy cells...43 Delete or clear cells...43 Enter a series...44 Find or replace

More information

Basics: How to Calculate Standard Deviation in Excel

Basics: How to Calculate Standard Deviation in Excel Basics: How to Calculate Standard Deviation in Excel In this guide, we are going to look at the basics of calculating the standard deviation of a data set. The calculations will be done step by step, without

More information

Jump Right In! Essential Computer Skills Using Microsoft 2013 By Andrews, Dark, and West

Jump Right In! Essential Computer Skills Using Microsoft 2013 By Andrews, Dark, and West Jump Right In! Essential Computer Skills Using Microsoft 2013 By Andrews, Dark, and West Chapter 10 Managing Numbers and Text Using Excel 1 Objectives Examine the Excel window and tools Enter and format

More information

To complete this workbook, you will need the following file:

To complete this workbook, you will need the following file: CHAPTER 1 Excel More Skills 12 Use Range Names in Formulas In Excel, a name is a word that represents a cell or a range of cells that can be used as a cell or range reference. Names used in formulas and

More information

Excel Macros, Links and Other Good Stuff

Excel Macros, Links and Other Good Stuff Excel Macros, Links and Other Good Stuff COPYRIGHT Copyright 2001 by EZ-REF Courseware, Laguna Beach, CA http://www.ezref.com/ All rights reserved. This publication, including the student manual, instructor's

More information

Maximizing the Power of Excel With Macros and Modules

Maximizing the Power of Excel With Macros and Modules Maximizing the Power of Excel With Macros and Modules Produced by SkillPath Seminars The Smart Choice 6900 Squibb Road P.O. Box 2768 Mission, KS 66201-2768 1-800-873-7545 www.skillpath.com Maximizing the

More information

= 3 + (5*4) + (1/2)*(4/2)^2.

= 3 + (5*4) + (1/2)*(4/2)^2. Physics 100 Lab 1: Use of a Spreadsheet to Analyze Data by Kenneth Hahn and Michael Goggin In this lab you will learn how to enter data into a spreadsheet and to manipulate the data in meaningful ways.

More information

Benchmark Excel 2010 Level 1, Chapter 5 Rubrics

Benchmark Excel 2010 Level 1, Chapter 5 Rubrics Benchmark Excel 2010 Level 1, Chapter 5 Rubrics Note that the following are suggested rubrics. Instructors should feel free to customize the rubric to suit their grading standards and/or to adjust the

More information

Geology Geomath Estimating the coefficients of various Mathematical relationships in Geology

Geology Geomath Estimating the coefficients of various Mathematical relationships in Geology Geology 351 - Geomath Estimating the coefficients of various Mathematical relationships in Geology Throughout the semester you ve encountered a variety of mathematical relationships between various geologic

More information

DOING MORE WITH EXCEL: MICROSOFT OFFICE 2010

DOING MORE WITH EXCEL: MICROSOFT OFFICE 2010 DOING MORE WITH EXCEL: MICROSOFT OFFICE 2010 GETTING STARTED PAGE 02 Prerequisites What You Will Learn MORE TASKS IN MICROSOFT EXCEL PAGE 03 Cutting, Copying, and Pasting Data Filling Data Across Columns

More information

Excel Forecasting Tools Review

Excel Forecasting Tools Review Excel Forecasting Tools Review Duke MBA Computer Preparation Excel Forecasting Tools Review Focus The focus of this assignment is on four Excel 2003 forecasting tools: The Data Table, the Scenario Manager,

More information

Computer Applications Data Processing FA 14

Computer Applications Data Processing FA 14 Lesson 7: Combining Multiple Data Sources Microsoft Excel 2016 IN THIS CHAPTER, YOU WILL LEARN HOW TO: Use workbooks as templates for other workbooks. Link to data in other worksheets and workbooks. Consolidate

More information

Chapter 3: The IF Function and Table Lookup

Chapter 3: The IF Function and Table Lookup Chapter 3: The IF Function and Table Lookup Objectives This chapter focuses on the use of IF and LOOKUP functions, while continuing to introduce other functions as well. Here is a partial list of what

More information

Lab 7 Macros, Modules, Data Access Pages and Internet Summary Macros: How to Create and Run Modules vs. Macros 1. Jumping to Internet

Lab 7 Macros, Modules, Data Access Pages and Internet Summary Macros: How to Create and Run Modules vs. Macros 1. Jumping to Internet Lab 7 Macros, Modules, Data Access Pages and Internet Summary Macros: How to Create and Run Modules vs. Macros 1. Jumping to Internet 1. Macros 1.1 What is a macro? A macro is a set of one or more actions

More information

Getting started 7. Writing macros 23

Getting started 7. Writing macros 23 Contents 1 2 3 Getting started 7 Introducing Excel VBA 8 Recording a macro 10 Viewing macro code 12 Testing a macro 14 Editing macro code 15 Referencing relatives 16 Saving macros 18 Trusting macros 20

More information

download instant at

download instant at CHAPTER 1 - LAB SESSION INTRODUCTION TO EXCEL INTRODUCTION: This lab session is designed to introduce you to the statistical aspects of Microsoft Excel. During this session you will learn how to enter

More information

Microsoft Excel Level 2

Microsoft Excel Level 2 Microsoft Excel Level 2 Table of Contents Chapter 1 Working with Excel Templates... 5 What is a Template?... 5 I. Opening a Template... 5 II. Using a Template... 5 III. Creating a Template... 6 Chapter

More information

Excel Community SAMPLE CONTENT

Excel Community SAMPLE CONTENT Excel Community GUIDE TO BUSINESS MODELLING BLOG SERIES SAMPLE CONTENT business with CONFIDENCE icaew.com/itfac Contents This document provides the full blog series on a Guide to Business Modelling written

More information

Quantitative Techniques: Laboratory 4 Revision

Quantitative Techniques: Laboratory 4 Revision Quantitative Techniques: Laboratory 4 Revision Overview In this lab your tasks are: 1. Complete Lab 3 (learn how put a loop into macros) 2. Practice with summary statistics 3. Binomial distribution Task

More information

Table of Contents Data Validation... 2 Data Validation Dialog Box... 3 INDIRECT function... 3 Cumulative List of Keyboards Throughout Class:...

Table of Contents Data Validation... 2 Data Validation Dialog Box... 3 INDIRECT function... 3 Cumulative List of Keyboards Throughout Class:... Highline Excel 2016 Class 10: Data Validation Table of Contents Data Validation... 2 Data Validation Dialog Box... 3 INDIRECT function... 3 Cumulative List of Keyboards Throughout Class:... 4 Page 1 of

More information

DATA 301 Introduction to Data Analytics Microsoft Excel VBA. Dr. Ramon Lawrence University of British Columbia Okanagan

DATA 301 Introduction to Data Analytics Microsoft Excel VBA. Dr. Ramon Lawrence University of British Columbia Okanagan DATA 301 Introduction to Data Analytics Microsoft Excel VBA Dr. Ramon Lawrence University of British Columbia Okanagan ramon.lawrence@ubc.ca DATA 301: Data Analytics (2) Why Microsoft Excel Visual Basic

More information

This chapter is intended to take you through the basic steps of using the Visual Basic

This chapter is intended to take you through the basic steps of using the Visual Basic CHAPTER 1 The Basics This chapter is intended to take you through the basic steps of using the Visual Basic Editor window and writing a simple piece of VBA code. It will show you how to use the Visual

More information

Creating If/Then/Else Routines

Creating If/Then/Else Routines 10 ch10.indd 147 Creating If/Then/Else Routines You can use If/Then/Else routines to give logic to your macros. The process of the macro proceeds in different directions depending on the results of an

More information

Microsoft Excel 2010 Training. Excel 2010 Basics

Microsoft Excel 2010 Training. Excel 2010 Basics Microsoft Excel 2010 Training Excel 2010 Basics Overview Excel is a spreadsheet, a grid made from columns and rows. It is a software program that can make number manipulation easy and somewhat painless.

More information

CS 105 Lab As a review of what we did last week a. What are two ways in which the Python shell is useful to us?

CS 105 Lab As a review of what we did last week a. What are two ways in which the Python shell is useful to us? 1 CS 105 Lab 3 The purpose of this lab is to practice the techniques of making choices and looping. Before you begin, please be sure that you understand the following concepts that we went over in class:

More information

Tutorial 9. Review. Data Tables and Scenario Management. Data Validation. Protecting Worksheet. Range Names. Macros

Tutorial 9. Review. Data Tables and Scenario Management. Data Validation. Protecting Worksheet. Range Names. Macros Tutorial 9 Data Tables and Scenario Management Review Data Validation Protecting Worksheet Range Names Macros 1 Examine cost-volume-profit relationships Suppose you were the owner of a water store. An

More information

How to Remove Duplicate Rows in Excel

How to Remove Duplicate Rows in Excel How to Remove Duplicate Rows in Excel http://www.howtogeek.com/198052/how-to-remove-duplicate-rows-in-excel/ When you are working with spreadsheets in Microsoft Excel and accidentally copy rows, or if

More information

BASIC EXCEL SYLLABUS Section 1: Getting Started Section 2: Working with Worksheet Section 3: Administration Section 4: Data Handling & Manipulation

BASIC EXCEL SYLLABUS Section 1: Getting Started Section 2: Working with Worksheet Section 3: Administration Section 4: Data Handling & Manipulation BASIC EXCEL SYLLABUS Section 1: Getting Started Unit 1.1 - Excel Introduction Unit 1.2 - The Excel Interface Unit 1.3 - Basic Navigation and Entering Data Unit 1.4 - Shortcut Keys Section 2: Working with

More information

Excel Tip: How to create a pivot table that updates automatically

Excel Tip: How to create a pivot table that updates automatically Submitted by Jess on Thu, 01/23/2014-21:38 Microsoft Excel has a powerful reporting tool called the Pivot Table. In a few minutes and in a few mouse clicks, you can build a report of your data. This is

More information

A Tutorial for Excel 2002 for Windows

A Tutorial for Excel 2002 for Windows INFORMATION SYSTEMS SERVICES Writing Formulae with Microsoft Excel 2002 A Tutorial for Excel 2002 for Windows AUTHOR: Information Systems Services DATE: August 2004 EDITION: 2.0 TUT 47 UNIVERSITY OF LEEDS

More information

Open Learning Guide. Microsoft Excel Introductory. Release OL356v1

Open Learning Guide. Microsoft Excel Introductory. Release OL356v1 Guide Microsoft Excel 2013 Introductory Note: Microsoft, Excel and Windows are registered trademarks of the Microsoft Corporation. Release OL356v1 Contents SECTION 1 FUNDAMENTALS... 9 1 - SPREADSHEET PRINCIPLES...

More information

lab MS Excel 2010 active cell

lab MS Excel 2010 active cell MS Excel is an example of a spreadsheet, a branch of software meant for performing different kinds of calculations, numeric data analysis and presentation, statistical operations and forecasts. The main

More information

Working with Basic Functions. Basic Functions. Excel 2010 Working with Basic Functions. The Parts of a Function. Page 1

Working with Basic Functions. Basic Functions. Excel 2010 Working with Basic Functions. The Parts of a Function. Page 1 Excel 2010 Working with Basic Functions Working with Basic Functions Page 1 Figuring out formulas for calculations you want to make in Excel can be tedious and complicated. Fortunately, Excel has an entire

More information

Using macros enables you to repeat tasks much

Using macros enables you to repeat tasks much An Introduction to Macros Using macros enables you to repeat tasks much more efficiently than tediously performing each step over and over. A macro is a set of instructions that you use to automate a task.

More information

Range Objects and the ActiveCell

Range Objects and the ActiveCell Range Objects and the Active Review Objects have two important features that we can make use of Properties Methods Talk does not cook rice. Chinese Proverb 2 Review Review There is a very precise syntax

More information

Introduction to Microsoft Excel

Introduction to Microsoft Excel Intro to Excel Introduction to Microsoft Excel OVERVIEW In this lab, you will become familiar with the general layout and features of Microsoft Excel spreadsheet computer application. Excel has many features,

More information

Module Four: Formulas and Functions

Module Four: Formulas and Functions Page 4.1 Module Four: Formulas and Functions Welcome to the fourth lesson in the PRC s Excel Spreadsheets Course 1. This lesson concentrates on adding formulas and functions to spreadsheet to increase

More information

EDIT202 Spreadsheet Lab Prep Sheet

EDIT202 Spreadsheet Lab Prep Sheet EDIT202 Spreadsheet Lab Prep Sheet While it is clear to see how a spreadsheet may be used in a classroom to aid a teacher in marking (as your lab will clearly indicate), it should be noted that spreadsheets

More information

BASIC MACROS IN EXCEL Presented by IGNACIO DURAN

BASIC MACROS IN EXCEL Presented by IGNACIO DURAN BASIC MACROS IN EXCEL 2013 Presented by IGNACIO DURAN Introduction What are Macros? Macros are little programs that run within Excel and help automate common repetitive tasks. Macros are one of Excel's

More information

Project 4 Financials (Excel)

Project 4 Financials (Excel) Project 4 Financials (Excel) Project Objective To offer an introduction to building spreadsheets, creating charts, and entering functions. Part 1 - Financial Projections One of the most important aspects

More information

3. (1.0 point) To quickly switch to the Visual Basic Editor, press on your keyboard. a. Esc + F1 b. Ctrl + F7 c. Alt + F11 d.

3. (1.0 point) To quickly switch to the Visual Basic Editor, press on your keyboard. a. Esc + F1 b. Ctrl + F7 c. Alt + F11 d. Excel Tutorial 12 1. (1.0 point) Excel macros are written in the programming language. a. Perl b. JavaScript c. HTML d. VBA 2. (1.0 point) To edit a VBA macro, you need to use the Visual Basic. a. Manager

More information

Excel Pivot Tables & Macros

Excel Pivot Tables & Macros Excel 2007 Pivot Tables & Macros WORKSHOP DESCRIPTION...1 Overview 1 Prerequisites 1 Objectives 1 WHAT IS A PIVOT TABLE...2 Sample Example 2 PivotTable Terminology 3 Creating a PivotTable 4 Layout of

More information

EXCEL BASICS: MICROSOFT OFFICE 2007

EXCEL BASICS: MICROSOFT OFFICE 2007 EXCEL BASICS: MICROSOFT OFFICE 2007 GETTING STARTED PAGE 02 Prerequisites What You Will Learn USING MICROSOFT EXCEL PAGE 03 Opening Microsoft Excel Microsoft Excel Features Keyboard Review Pointer Shapes

More information

INFORMATION SHEET 24002/1: AN EXCEL PRIMER

INFORMATION SHEET 24002/1: AN EXCEL PRIMER INFORMATION SHEET 24002/1: AN EXCEL PRIMER How to use this document This guide to the basics of Microsoft Excel is intended for those people who use the program, but need or wish to know more than the

More information

DOWNLOAD PDF MICROSOFT EXCEL ALL FORMULAS LIST WITH EXAMPLES

DOWNLOAD PDF MICROSOFT EXCEL ALL FORMULAS LIST WITH EXAMPLES Chapter 1 : Examples of commonly used formulas - Office Support A collection of useful Excel formulas for sums and counts, dates and times, text manipularion, conditional formatting, percentages, Excel

More information

CALCULATE NPV USING EXCEL

CALCULATE NPV USING EXCEL CALCULATE NPV USING EXCEL Identify major components of the Excel window Excel is a computerized spreadsheet, which is an important business tool that helps you report and analyze information. Excel stores

More information

Microsoft Office Excel Use Excel s functions. Tutorial 2 Working With Formulas and Functions

Microsoft Office Excel Use Excel s functions. Tutorial 2 Working With Formulas and Functions Microsoft Office Excel 2003 Tutorial 2 Working With Formulas and Functions 1 Use Excel s functions You can easily calculate the sum of a large number of cells by using a function. A function is a predefined,

More information

Using Microsoft Excel

Using Microsoft Excel Using Microsoft Excel Excel contains numerous tools that are intended to meet a wide range of requirements. Some of the more specialised tools are useful to people in certain situations while others have

More information

Advanced Financial Modeling Macros. EduPristine

Advanced Financial Modeling Macros. EduPristine Advanced Financial Modeling Macros EduPristine www.edupristine.com/ca Agenda Introduction to Macros & Advanced Application Building in Excel Introduction and context Key Concepts in Macros Macros as recorded

More information

DOWNLOAD PDF VBA MACRO TO PRINT MULTIPLE EXCEL SHEETS TO ONE

DOWNLOAD PDF VBA MACRO TO PRINT MULTIPLE EXCEL SHEETS TO ONE Chapter 1 : Print Multiple Sheets Macro to print multiple sheets I have a spreadsheet set up with multiple worksheets. I have one worksheet (Form tab) created that will pull data from the other sheets

More information

Excel Level 3 - Advanced

Excel Level 3 - Advanced Excel Level 3 - Advanced Introduction This document covers some of the more advanced features of Excel. Spreadsheets can be used in such a multiplicity of ways that it cannot hope to even touch on all

More information

WEEK NO. 12 MICROSOFT EXCEL 2007

WEEK NO. 12 MICROSOFT EXCEL 2007 WEEK NO. 12 MICROSOFT EXCEL 2007 LESSONS OVERVIEW: GOODBYE CALCULATORS, HELLO SPREADSHEET! 1. The Excel Environment 2. Starting A Workbook 3. Modifying Columns, Rows, & Cells 4. Working with Worksheets

More information

CpSc 1011 Lab 4 Formatting and Flow Control Windchill Temps

CpSc 1011 Lab 4 Formatting and Flow Control Windchill Temps CpSc 1011 Lab 4 Formatting and Flow Control Windchill Temps Overview By the end of the lab, you will be able to: use fscanf() to accept inputs from the user and use fprint() for print statements to the

More information

Window (further define the behaviour of objects)

Window (further define the behaviour of objects) Introduction to Visual Basic Visual Basic offers a very comprehensive programming environment that can be a bit overwhelming at the start. The best rule is to ignore all that you do not need until you

More information

Performing Basic Calculations

Performing Basic Calculations 7.1 LESSON 7 Performing Basic Calculations After completing this lesson, you will be able to: Build formulas. Copy formulas. Edit formulas. Use the SUM function and AutoSum. Use the Insert Function feature.

More information

Practical 2: Using Minitab (not assessed, for practice only!)

Practical 2: Using Minitab (not assessed, for practice only!) Practical 2: Using Minitab (not assessed, for practice only!) Instructions 1. Read through the instructions below for Accessing Minitab. 2. Work through all of the exercises on this handout. If you need

More information

Chapter-2 Digital Data Analysis

Chapter-2 Digital Data Analysis Chapter-2 Digital Data Analysis 1. Securing Spreadsheets How to Password Protect Excel Files Encrypting and password protecting Microsoft Word and Excel files is a simple matter. There are a couple of

More information

Formulas in Microsoft Excel

Formulas in Microsoft Excel Formulas in Microsoft Excel Formulas are the main reason for wanting to learn to use Excel. This monograph is intended as a quick reference to the basic concepts underlying the use of formulas. It is prepared

More information

Reference Services Division Presents. Excel Introductory Course

Reference Services Division Presents. Excel Introductory Course Reference Services Division Presents Excel 2007 Introductory Course OBJECTIVES: Navigate Comfortably in the Excel Environment Create a basic spreadsheet Learn how to format the cells and text Apply a simple

More information

dark star Excelsior User s guide A Year 2000 Auto-Renovation Tool

dark star Excelsior User s guide A Year 2000 Auto-Renovation Tool dark star s y s t e m s Excelsior User s guide A Year 2000 Auto-Renovation Tool dark star s y s t e m s Excelsior User s guide A Year 2000 Auto-Renovation Tool Dark Star Systems Inc., 1999. All rights

More information

UW Department of Chemistry Lab Lectures Online

UW Department of Chemistry Lab Lectures Online Introduction to Excel and Computer Manipulation of Data Review Appendix A: Introduction to Statistical Analysis. Focus on the meanings and implications of the calculated values and not on the calculations.

More information

Unit 3 Fill Series, Functions, Sorting

Unit 3 Fill Series, Functions, Sorting Unit 3 Fill Series, Functions, Sorting Fill enter repetitive values or formulas in an indicated direction Using the Fill command is much faster than using copy and paste you can do entire operation in

More information

Excel Foundation (Step 2)

Excel Foundation (Step 2) Excel 2007 Foundation (Step 2) Table of Contents Working with Names... 3 Default Names... 3 Naming Rules... 3 Creating a Name... 4 Defining Names... 4 Creating Multiple Names... 5 Selecting Names... 5

More information

Microsoft Excel 2010

Microsoft Excel 2010 Microsoft Excel 2010 omar 2013-2014 First Semester 1. Exploring and Setting Up Your Excel Environment Microsoft Excel 2010 2013-2014 The Ribbon contains multiple tabs, each with several groups of commands.

More information

Unit 3 Functions Review, Fill Series, Sorting, Merge & Center

Unit 3 Functions Review, Fill Series, Sorting, Merge & Center Unit 3 Functions Review, Fill Series, Sorting, Merge & Center Function built-in formula that performs simple or complex calculations automatically names a function instead of using operators (+, -, *,

More information

Intermediate Excel Training Course Content

Intermediate Excel Training Course Content Intermediate Excel Training Course Content Lesson Page 1 Absolute Cell Addressing 2 Using Absolute References 2 Naming Cells and Ranges 2 Using the Create Method to Name Cells 3 Data Consolidation 3 Consolidating

More information

CS 200. Lecture 07. Excel Scripting. Miscellaneous Notes

CS 200. Lecture 07. Excel Scripting. Miscellaneous Notes CS 200 Lecture 07 1 Abbreviations aka Also Known As Miscellaneous Notes CWS Course Web Site (http://www.student.cs.uwaterloo.ca/~cs200) VBE Visual Basic Editor intra- a prefix meaning within thus intra-cellular

More information

Documentation of DaTrAMo (Data Transfer- and Aggregation Module)

Documentation of DaTrAMo (Data Transfer- and Aggregation Module) 1. Introduction Documentation of DaTrAMo (Data Transfer- and Aggregation Module) The DaTrAMo for Microsoft Excel is a solution, which allows to transfer or aggregate data very easily from one worksheet

More information

Section 3. Formulas. By the end of this Section you should be able to:

Section 3. Formulas. By the end of this Section you should be able to: Excel 2003 CLAIT Plus Section 3 Formulas By the end of this Section you should be able to: Create Simple Formulas Understand Mathematical Operators Use Brackets Calculate Percentages Select Cells with

More information

Using Basic Formulas 4

Using Basic Formulas 4 Using Basic Formulas 4 LESSON SKILL MATRIX Skills Exam Objective Objective Number Understanding and Displaying Formulas Display formulas. 1.4.8 Using Cell References in Formulas Insert references. 4.1.1

More information

Learning Excel VBA. Creating User Defined Functions. ComboProjects. Prepared By Daniel Lamarche

Learning Excel VBA. Creating User Defined Functions. ComboProjects. Prepared By Daniel Lamarche Learning Excel VBA Creating User Defined Functions Prepared By Daniel Lamarche ComboProjects Creating User Defined Functions By Daniel Lamarche (Last update January 2016). User Defined Functions or UDFs

More information

Contents. Session 2. COMPUTER APPLICATIONS Excel Spreadsheets

Contents. Session 2. COMPUTER APPLICATIONS Excel Spreadsheets Session 2 Contents Contents... 23 Cell Formats cont..... 24 Worksheet Views... 24 Naming Conventions... 25 Copy / Duplicate Worksheets... 27 Entering Formula & Functions... 28 Page - 23 Cell Formats cont..

More information

Chapter 5. Repetition. Contents. Introduction. Three Types of Program Control. Two Types of Repetition. Three Syntax Structures for Looping in C++

Chapter 5. Repetition. Contents. Introduction. Three Types of Program Control. Two Types of Repetition. Three Syntax Structures for Looping in C++ Repetition Contents 1 Repetition 1.1 Introduction 1.2 Three Types of Program Control Chapter 5 Introduction 1.3 Two Types of Repetition 1.4 Three Structures for Looping in C++ 1.5 The while Control Structure

More information

DOWNLOAD PDF MICROSOFT OFFICE POWERPOINT 2003, STEP BY STEP

DOWNLOAD PDF MICROSOFT OFFICE POWERPOINT 2003, STEP BY STEP Chapter 1 : Microsoft Office Excel Step by Step - PDF Free Download Microsoft Office PowerPoint Step by Step This is a good book for an 76 year old man like me. It was a great help in teaching me to do

More information

EXCEL PRACTICE 5: SIMPLE FORMULAS

EXCEL PRACTICE 5: SIMPLE FORMULAS EXCEL PRACTICE 5: SIMPLE FORMULAS SKILLS REVIEWED: Simple formulas Printing with and without formulas Footers Widening a column Putting labels and data in Bold. PART 1 - DIRECTIONS 1. Open a new spreadsheet

More information

Microsoft Excel 2007

Microsoft Excel 2007 Learning computers is Show ezy Microsoft Excel 2007 301 Excel screen, toolbars, views, sheets, and uses for Excel 2005-8 Steve Slisar 2005-8 COPYRIGHT: The copyright for this publication is owned by Steve

More information

Excel Lesson 3 USING FORMULAS & FUNCTIONS

Excel Lesson 3 USING FORMULAS & FUNCTIONS Excel Lesson 3 USING FORMULAS & FUNCTIONS 1 OBJECTIVES Enter formulas in a worksheet Understand cell references Copy formulas Use functions Review and edit formulas 2 INTRODUCTION The value of a spreadsheet

More information

Skill Set 3. Formulas

Skill Set 3. Formulas Skill Set 3 Formulas By the end of this Skill Set you should be able to: Create Simple Formulas Understand Totals and Subtotals Use Brackets Select Cells with the Mouse to Create Formulas Calculate Percentages

More information

Math 1525 Excel Lab 1 Introduction to Excel Spring, 2001

Math 1525 Excel Lab 1 Introduction to Excel Spring, 2001 Math 1525 Excel Lab 1 Introduction to Excel Spring, 2001 Goal: The goal of Lab 1 is to introduce you to Microsoft Excel, to show you how to graph data and functions, and to practice solving problems with

More information

EXCEL BASICS: MICROSOFT OFFICE 2010

EXCEL BASICS: MICROSOFT OFFICE 2010 EXCEL BASICS: MICROSOFT OFFICE 2010 GETTING STARTED PAGE 02 Prerequisites What You Will Learn USING MICROSOFT EXCEL PAGE 03 Opening Microsoft Excel Microsoft Excel Features Keyboard Review Pointer Shapes

More information

Assignment 2: Temperature Class

Assignment 2: Temperature Class Assigned: September 23, 2016 Due: October 03, 2016, 11:59:59pm Assignment 2: Temperature Class Purpose The purpose of this project is to provide you more practice with implementing classes. Here you will

More information

CS 200. Lecture 07. Excel Scripting. Excel Scripting. CS 200 Fall 2016

CS 200. Lecture 07. Excel Scripting. Excel Scripting. CS 200 Fall 2016 CS 200 Lecture 07 1 Abbreviations aka Also Known As Miscellaneous Notes CWS Course Web Site (http://www.student.cs.uwaterloo.ca/~cs200) VBE Visual Basic Editor intra- a prefix meaning within thus intra-cellular

More information

CS 200. Lecture 07. Excel Scripting. Miscellaneous Notes

CS 200. Lecture 07. Excel Scripting. Miscellaneous Notes CS 200 Lecture 07 1 Abbreviations aka Also Known As Miscellaneous Notes CWS Course Web Site (http://www.student.cs.uwaterloo.ca/~cs200) VBE Visual Basic Editor intra- a prefix meaning within thus intra-cellular

More information

Create formulas in Excel

Create formulas in Excel Training Create formulas in Excel EXERCISE 1: TYPE SOME SIMPLE FORMULAS TO ADD, SUBTRACT, MULTIPLY, AND DIVIDE 1. Click in cell A1. First you ll add two numbers. 2. Type =534+382. 3. Press ENTER on your

More information

Visual basic tutorial problems, developed by Dr. Clement,

Visual basic tutorial problems, developed by Dr. Clement, EXCEL Visual Basic Tutorial Problems (Version January 20, 2009) Dr. Prabhakar Clement Arthur H. Feagin Distinguished Chair Professor Department of Civil Engineering, Auburn University Home page: http://www.eng.auburn.edu/users/clemept/

More information