# Visual basic tutorial problems, developed by Dr. Clement,

Save this PDF as:

Size: px
Start display at page:

## Transcription

1 EXCEL Visual Basic Tutorial Problems (Version January, 2011) Dr. Prabhakar Clement Arthur H. Feagin Distinguished Chair Professor Department of Civil Engineering, Auburn University Home page: How to activate the Developer Tab? When you open EXCEL (in Office 2007) you should see a tab called Developer in the very end next to the View tab. If you don t then you need to activate it. You can do this by clicking on the office menu button (round button in left, where you have the print, save commands). At the very bottom of this menu you will see Excel options (see the figure below), click on that and then select (check mark) Show Developer tab in the ribbon. Say ok. Now you should see the Developer tab. 1

2 Note: Textbooks often follow different approaches for writing a VB code. The method shown here is a relatively simple and straight forward approach to write a VB code in EXCEL. The problem below shows how to create a VB button and rename it to name you like. But you don t have to rename, you can just leave it as the default name of Sub CommandButton1_Click() the program should still work. Test Problem-0: Develop a simple calculator that will add or subtract numbers two numbers entered in a spreadsheet. The final result will look like this: The VB code for the ADD and SUBTRACT buttons are: Private Sub codeadd_click() Dim a As Single, b As Single, c As Single a = Cells(1, 2) b = Cells(3, 2) c = a + b Cells(5, 2) = c Private Sub codesubtract_click() Dim a As Single, b As Single, c As Single a = Cells(1, 2) 2

5 Area = Length * Width This is the core computational step where your program calculates the area using the standard formal for computing areas and transfers (or assigns) the computed area to the variable named Area. Cells(4, 2) = Area The above operation is similar to the earlier cell operation, expect the data flows in a reverse direction (from program to spreadsheet). The computed value of area is transferred to your EXCEL spreadsheet cells (4,2). 5

6 Test Problem-2: Understanding simple IF-THEN-ELSE condition Problem Statement: Develop an advanced version of area calculator that will compute the area (as described above) and in addition it will also let the user know whether the object he is dealing with is a rectangle or a square. Area Calculator-Ver2 Length (m) Width (m) Area (m^2) Object Type Set up a command button and enter the following code: Private Sub Mycode_Click() Dim Length As Single, Width As Single, Area As Single Length = Cells(2, 2) Width = Cells(3, 2) Area = Length * Width Cells(4, 2) = Area If Length = Width Then Cells(5, 2) = "Square" Else Cells(5, 2) = "Rectangle" End If Exit the design mode and run the code. You will see that your spreadsheet will be updated with the data shown below: Area Calculator-Ver2 Length (m) Width (m) Area (m^2) Object Type Rectangle Also, Area Calculator-Ver2 Length (m) Width (m) Area (m^2) Object Type Square This program is almost identical to the previous program, except you used if-then-endif structure to make a decision on the type of object you are dealing with it. Note: It is always important to use proper indentation when you use IF and For-next conditions. It is easy to use Tab for this purpose. However, the default for tab is 4 spaces, but you can change this to two spaces by using Tools, options, Editor tab and change Tab Width to 2.

7 Test Problem-3: Understanding simple For-Next Loop Problem Statement: Design a VB program to compute the areas of n number of squares and circles, given their characteristic dimensions (length of the side for squares or radius for circles). The value of n and the dimensions are entered in the spreadsheet as show below: Number of squares/circles Dimension Square_area Circle_area Use EXCEL to create the above spreadsheet. Setup a command button and enter the following code: Private Sub Mycode_Click() Dim i As Integer, n As Integer Dim A As Single, result1 As Single, result2 As Single n = Cells(2, 1) Step 1 A = Cells(3 + i, 1) result1 = A ^ 2 result2 = 3.14 * A ^ 2 Cells(3 + i, 2) = result1 Cells(3 + i, 3) = result2 Run the code and you will see that your spreadsheet will be updated with the data shown below: Number of squares/circles Dimension Square_area Circle_area Now let us look into the program and learn exactly what happened! Dim i As Integer, n As Integer 7

8 Here you declare variables i and n which are integers (in VB you have to define all the variables and also declare what type they are. In this class, you should always use loop index or counters (e.g., i,j,k, etc) as integers (you will loose points otherwise even if your code works!). Also, if you know certain variable will always be used to store integer numbers then declare them as integers. In this example, n has to be an integer since there is will be only integer value for the number of circles or square, it can never be a real number like.5 circles! Also, note declaring a variable as an integer allows to hold signed 32-bit (4-byte) integers ranging in value from -2,147,483,48 through 2,147,483,47. Dim A As Single, result1 As Single, result2 As Single Here you declare variables A, result1, and result2 as dynamically single precision real numbers. You can also declare them as double, if you want to store high precision real numbers. n = Cells(2, 1) Here you transfer the value of n that you have entered in your spread sheet at location (2,1, which is row 2 and column 1) into the integer variable called n. Note, it is logical to declare n as an integer since it will always take an integer value (there will only be 3 or 4 circles not 3.2 circles!). Step 1 A = Cells(3 + i, 1) result1 = A ^ 2 result2 = 3.14 * A ^ 2 Cells(3 + i, 2) = result1 Cells(3 + i, 3) = result2 The above code segment first initializes a loop using the statement For i = 1 to n Step 1. This instructs the computer to begin a loop and use the counter i which will be incremented by 1 every time the loop is executed. The increment will continue until the value of n is exceeded. The statement A = Cells(3 + i, 1) will transfer the dimension value in the spreadsheet cell at row number 3+i and column number 1 to the variable A. The variable result1 and result2 will store the computed values of the areas of square and circle, respectively. The last two statement transfers the computed areas to appropriate cells location in spreadsheet. 8

10 Test problem-5: Understanding accumulators used in a For-Next loop Problem Statement: Develop a VB program that computes the average salary the staff in small consulting firm. The salary data is setup in spreadsheet as shown below: Number of staff 7 Name Salary John \$100, Jane \$150, Jacob \$90, Josh \$25, Jay \$50, Jack \$75, Joy \$89, Average Note: in order display dollar sign you need to select that column and set the format using format, cells currency. Set up a command button and enter the following code: Private Sub Mycode_Click() Dim Sum As Single, Average As Single Dim i As Integer, n As Integer, Salary(7)as single n = Cells(1, 2) Salary(i) = Cells(2 + i, 2) Sum = 0# Here we are Sum = Sum + Salary(i) initializing the variable sum as zero Average = Sum / n Cells(n + 4, 2) = Average Run the code and you will see that your spreadsheet will be updated with the data shown below: Number of staff 7 Name Salary John \$100, Jane \$150, Jacob \$90, Josh \$25, Jay \$50, Jack \$75, Joy \$89, Average \$82, Note in the above code we have used the variable sum as an accumulator. Note when i=1, sum=0, then it is assigned a value of sum+100,000, which is 100,000. When i=2 sum = 100,000 and then it is assigned a value of 100, ,000.. this operation is repeated until all salaries of all the employees are added. 10

11 Test Problem-: Understanding simple one dimensional arrays Problem Statement: Design a VB program to compute the areas of n number of squares and circles, given their characteristic dimensions (length of the side for squares or radius for circles). The value of n and the dimensions are entered in the spreadsheet as show below: Number of squares/circles Dimension Square_area Circle_area Use EXCEL to create the above spreadsheet. Setup a command button and enter the following code: Private Sub Mycode_Click() Dim i As Integer, n As Integer, A As Single Dim result1() As Single, result2() As Single n = Cells(2, 1) ReDim result1(n), result2(n) Step 1 A = Cells(3 + i, 1) result1(i) = A ^ 2 result2(i) = 3.14 * A ^ 2 Step 1 Cells(3 + i, 2) = result1(i) Cells(3 + i, 3) = result2(i) Run the code and you will see that your spreadsheet will be updated with the data shown below: Number of squares/circles Dimension Square_area Circle_area

12 This example is identical to problem-4, except we used one-dimensional arrays results1() and results2() to first store the values internally and then we output the results after finishing all the computations. Test Problem-7: Working with one-dimensional array variables and multiple subroutines Objectives: Design a VB program to compute the areas of n number of squares and circles, given their characteristic dimensions (length of the side for squares or radius for circles). Use multiple subroutines and array variable to complete all the computations and then output the computed values. The value of n and the dimensions are entered in the spreadsheet as show below: Number of squares/circles Dimension Square_area Circle_area Use EXCEL to create the above spreadsheet. Set up a command button to enter the following code: Private Sub Mycode_Click() Dim i As Integer, n As Integer Dim A() As Single, result1() As Single, result2() As Single n = Cells(2, 1) ReDim A(n) As Single, result1(n) As Single, result2(n) As Single Step 1 A(i) = Cells(3 + i, 1) Call Square(n, A(), result1()) Call Circ(n, A(), result2()) Step 1 Cells(3 + i, 2) = result1(i) Cells(3 + i, 3) = result2(i) Sub Square(n as integer, AA() as single, result() as single) Dim i As Integer result(i) = AA(i) ^ 2 Sub Circ(n as integer, AB() as single, result() as single) Dim i As Integer 12

13 result(i) = 3.14 * AB(i) ^ 2 Now run the code and you will see that your spreadsheet will be updated with the data shown below: Number of squares/circles Dimension Square_area Circle_area Now let us look into the program and learn exactly what we did! This allows you to start 1 as the base for any array. For example if you define Amat as a 3 x 2 array the first entry in the array will be Amat(1,1). If we do not use this statement then there will entries Amat(0,0), (0,1) and Amat(0,2).. while the presence of empty values at these spots may not affect calculations, it can be confusing during the debugging process. Use of option base 1 allows to start a 1-D array at A(1), 2-D array at A(1,1), and 3-D array at A (1,1,1).. so on. Dim i As Integer, n As Integer Here you declare variables i and n which are integers (in VB you have to define all the variables and also declare what type they are. It is a good practice to use loop index or counters (e.g., i,j,k, etc)_ as integers. Also, if you know certain variable will always be used to store integer numbers then declare them as integers. Dim A() As Single, result1() As Single, result2() As Single Here you declare variables A, result1, and result2 as dynamically allocatable single precision real number arrays. You can also declare them as double, if you want to store high precision real numbers. n = Cells(2, 1) Here you transfer the value of n that you have entered in your spread sheet at location (2,1, which is row 2 and column 1) into the integer variable called n. Note, it is logical to declare n as an integer since it will always take an integer value (there will only be 3 or 4 circles not 3.2 circles!). ReDim A(n) As Single, result1(n) As Single, result2(n) As Single Here you allocate the exact size of arrays A, result1, and result2. The computer will not set aside certain amount of memory to store values in these arrays. Step 1 A(i) = Cells(3 + i, 1) 13

14 Here you run a FOR loop to read the characteristic dimensions of the circles/squares entered in your spreadsheet. Note the loop index i is used point the row and column number of the cells in the spreadsheet. Call Square(n, A(), result1()) Call Circ(n, A(), result2()) Here you call the subroutines to compute the area of squares and circles. Note you send the values of n and A into these routines and the routine computes the result and sends it back to your main program. It is good to use a convention where all the input variables are listed first followed by the list the output variables. Also, parentheses are placed next to the array variables to indicate to VB that it passing array variables. Notice no parentheses are used in the receiving subroutine. Step 1 Cells(3 + i, 2) = result1(i) Cells(3 + i, 3) = result2(i) The loop above allows you to output the computed areas back to appropriate cell locations within your spreadsheet Sub Square(n as integer, AA() as single, result() as single) Dim i As Integer result(i) = AA(i) ^ 2 The code above is a subroutine (similar to MATLAB functions) that computes the area of n number of squares. The results are stored in the variable result. This routine is invoked when Call Square(n, A, result1) is executed in the main program. Note, the value of n is transferred into the subroutine as n, value of A is transferred (or mapped) as AA, the values in the variable result computed within the routine is transferred (or mapped) back to the main program as a variable result1. Visual basic, by default will pass the variable values into a subroutine by reference. Another option to pass values (not discussed in this class) is by value. When the variable names are passed by reference, the computer will use the original memory locations that have already been setup for the variables in the calling routine. The mapped variables simply refer to the same memory location, even if their names are different. One possible limitation of this strategy is that the local routine may inadvertently change the value of the variable that is not supposed to be changed. For example, if the value of n is set to, say 100, either in the routine circle or square then the value of n will become 100 in the main routine too. This type of situations can lead to serious run time bugs that are difficult to track. To avoid such problems, passing by value method should be used (however, we will not cover this topic in this class). Sub Circ(n as integer, AB() as single, result() as single) Dim i As Integer result(i) = 3.14 * AB(i) ^ 2 The code above is the second subroutine (similar to the one discussed above). This routine computes the area of n number of circles. The results are stored in the variable result 14

15 Test Problem-8: Working with multi-dimensional arrays Objectives: Design a VB program that can multiple a n n matrix with a n 1 matrix. First setup the following spreadsheet to define input to the program Dimension 3 Mat A Mat B Mat C Note, between matrix A and B we leave a blank column, also between Matrix B and C we leave a blank column. Set up a command button and enter the following code: Private Sub Mycode_Click() Dim i As Integer, j As Integer, n As Integer Dim A() As Single, B() As Single, C() As Single n = Cells(1, 2) ReDim A(n, n) As Single, B(n) As Single, C(n) As Single 'Read Matrix A from spreadsheet For j = 1 To n A(i, j) = Cells(2 + i, j) Next j 'Read Matrix B from spreadsheet B(i) = Cells(2 + i, n + 2) 'Perform matrix multiplication to compute C C(i) = 0# For j = 1 To n C(i) = C(i) + A(i, j) * B(j) Next j 'Output the results to spreadsheet Cells(2 + i, n + 4) = C(i) 15

### INTRODUCTION TO FORMS IN VISUAL BASIC IN EXCEL

INTRODUCTION TO FORMS IN VISUAL BASIC IN EXCEL The forms are used to create a user interface for the visual basic programs. This is a useful tool to learn as it will help create intuitive user-friendly

### USING MICROSOFT EXCEL 2007

USING MICROSOFT EXCEL 2007 Before you get started with Microsoft Excel (commonly referred to as MS Excel, you will need to locate and open it on the computer. It may be on your desktop. On the computer

### Excel Macro Tutorial for beginners. First Step to make you excellent in Excel VBA

HTTP://WWW.LEARNEXCELMACRO.COM Click to Send a Feedback to Me Excel Macro Tutorial for beginners First Step to make you excellent in Excel VBA http://www.learnexcelmacro.acom Vishwamitra Mishra 9/11/2012

### IOWA STATE UNIVERSITY Department of Community and Regional Planning

IOWA STATE UNIVERSITY Department of Community and Regional Planning CRP274 PLANNING ANALYSIS AND TECHNIQUES II INTRODUCTION TO EXCEL FOR WINDOWS 1 Basic Components of Spreadsheet 1.1 Worksheet An Excel

### An introduction to programming in Visual Basic AGEC

This document was generated at 5:33 PM on Thursday, October 03, 2013 An introduction to programming in Visual Basic AGEC 637-2013 I. Introduction The purpose of this tutorial is to provide you with the

### HELP FOR DEBUGGING VB CODES Debugging is an essential part of programming. Even for an experienced programmer most codes will not work in the first

1 HELP FOR DEBUGGING VB CODES Debugging is an essential part of programming. Even for an experienced programmer most codes will not work in the first attempt due to typo, mathematical errors and logical

### EXCEL Tutorial: How to use EXCEL for Graphs and Calculations.

EXCEL Tutorial: How to use EXCEL for Graphs and Calculations. Excel is powerful tool and can make your life easier if you are proficient in using it. You will need to use Excel to complete most of your

### Module 3: Visual Basic for Applications (VBA) Bruno Abreu Calfa. Last Update: April 4, MS Excel and VBA. Front Matter.

MS Excel and Module 3: Visual Basic for () Bruno Abreu Calfa Last Update: April 4, 2012 1 / 35 Outline 1 2 3 4 5 6 7 8 2 / 35 Outline 1 2 3 4 5 6 7 8 3 / 35 Why? Visual Basic for () is a programming language

### In this example, Mrs. Smith is looking to create graphs that represent the ethnic diversity of the 24 students in her 4 th grade class.

Creating a Pie Graph Step-by-step directions In this example, Mrs. Smith is looking to create graphs that represent the ethnic diversity of the 24 students in her 4 th grade class. 1. Enter Data A. Open

### above the Ribbon. It contains commands such as Save, Undo, Repeat, Redo and other commands that formerly appeared under drop-down menus.

Beginning Excel 2010 Objective 1: Review Screen Layout Excel 2010 offers the same user interface as 2007. The top portion of the window has a new structure for Excel commands. The band area is called the

### User-defined Functions (UDFs)

User-defined Functions (UDFs) In this lecture I will be introducing the programmation language Visual Basic for Applications (VBA) and explaining one particular use of it: creating UDFs. VBA is a powerful

### As in the example above, a Budget created on the computer typically has:

Activity Card Create a How will you ensure that your expenses do not exceed what you planned to invest or spend? You can create a budget to plan your expenditures and earnings. As a family, you can plan

Table of Contents Elements of An Excel Document... 2 Resizing and Hiding Columns and Rows... 3 Using Panes to Create Spreadsheet Headers... 3 Using the AutoFill Command... 4 Using AutoFill for Sequences...

### Recipes4Success. Create a Vacation Budget. Excel 2003

Recipes4Success In this Recipe, you will learn the basics of using Excel. You will input planned expenses for a vacation. You will use the data to learn how long your vacation can last based on your budget.

### VB.NET Programming Fundamentals

Chapter 3 Objectives Programming Fundamentals In this chapter, you will: Learn about the programming language Write a module definition Use variables and data types Compute with Write decision-making statements

MS Excel Handout: Level 2 elearning Department 2016 Page 1 of 11 Contents Excel Environment:... 3 To create a new blank workbook:...3 To insert text:...4 Cell addresses:...4 To save the workbook:... 5

### INTRODUCTION TO EXCEL

INTRODUCTION TO EXCEL 1 INTRODUCTION Anyone who has used a computer for more than just playing games will be aware of spreadsheets A spreadsheet is a versatile computer program (package) that enables you

### Final Exam Review: VBA

Engineering Fundamentals ENG1100 - Session 14B Final Exam Review: VBA 1 //coe/dfs/home/engclasses/eng1101/f03/ethics/en1.e05.finalcoursewrapup.sxi Final Programming Exam Topics Flowcharts Assigning Variables

### Alternate Appendix A: Using the TI-89 Calculator

Alternate Appendix A: Using the TI-89 Calculator This document summarizes TI-89 calculation and programming operations as they relate to the text, Inside Your Calculator. Even those who do not read the

### Introduction to Microsoft Excel 2007

Introduction to Microsoft Excel 2007 Class learning objectives 1. What is Excel? Spreadsheet uses & samples Touring the Excel window Learning important definitions Navigating around the workbook 2. The

### Basic Pivot Tables. To begin your pivot table, choose Data, Pivot Table and Pivot Chart Report. 1 of 18

Basic Pivot Tables Pivot tables summarize data in a quick and easy way. In your job, you could use pivot tables to summarize actual expenses by fund type by object or total amounts. Make sure you do not

### Excel Worksheet Basics

NDUS Training and Documentation Excel Worksheet Basics Welcome Since Excel has been identified as the spreadsheet application supported by the PeopleSoft system, it s a good idea to learn how to use it

### Microsoft Excel 2007. Introduction to Microsoft Excel 2007

Microsoft Excel 2007 Introduction to Microsoft Excel 2007 Excel is an electronic spreadsheet to organize your data into rows and columns. One can use it to perform basic to advanced level mathematical

### Basic Microsoft Excel 2008

Basic Microsoft Excel 2008 Table of Contents Excel Window Properties... 2 Creating a New Workbook... 3 Creating New Worksheets... 3 Renaming a Worksheet... 3 Deleting a Worksheet... 3 Selecting Cells...

### Excel 2007. Getting Started The Excel Window u v w. Microsoft QUICK Source

Microsoft QUICK Source Excel 2007 Getting Started The Excel Window u v w x y z { u Quick Access Toolbar contains shortcuts for the most commonly used tools. v Microsoft Office Button contains common file

### 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

### Q&As: Microsoft Excel 2013: Chapter 2

Q&As: Microsoft Excel 2013: Chapter 2 In Step 5, why did the date that was entered change from 4/5/10 to 4/5/2010? When Excel recognizes that you entered a date in mm/dd/yy format, it automatically formats

### Pivot Tables, Lookup Tables and Scenarios

Introduction Format and manipulate data using pivot tables. Using a grading sheet as and example you will be shown how to set up and use lookup tables and scenarios. Contents Introduction Contents Pivot

### Intermediate Excel 2007

Intermediate Excel 2007 Relative & Absolute Referencing Relative Referencing When you copy a formula to another cell, Excel automatically adjusts the cell reference to refer to different cells relative

### Excel: Introduction to Formulas

Excel: Introduction to Formulas Table of Contents Formulas Arithmetic & Comparison Operators... 2 Text Concatenation... 2 Operator Precedence... 2 UPPER, LOWER, PROPER and TRIM... 3 & (Ampersand)... 4

### ECDL. European Computer Driving Licence. Spreadsheet Software BCS ITQ Level 2. Syllabus Version 5.0

European Computer Driving Licence Spreadsheet Software BCS ITQ Level 2 Using Microsoft Excel 2010 Syllabus Version 5.0 This training, which has been approved by BCS, The Chartered Institute for IT, includes

IT Academy Program 10 IT ACADEMY LESSON PLAN Microsoft Excel Lesson 5 Turn potential into success Lesson 5: Working with Formulas and Functions Learning Objectives Learning Goals // The goal of this lesson

### Macros (Subroutines):

Macros (Subroutines): In Lab session 1 you have already seen how to write a subroutine (also called a Macro) using the VBA editor. A subroutine is quite different from a UDF. We can not use it in an Excel

### Task Force on Technology / EXCEL

Task Force on Technology EXCEL Basic terminology Spreadsheet A spreadsheet is an electronic document that stores various types of data. There are vertical columns and horizontal rows. A cell is where the

### Excel Basics By Tom Peters & Laura Spielman

Excel Basics By Tom Peters & Laura Spielman What is Excel? Microsoft Excel is a software program with spreadsheet format enabling the user to organize raw data, make tables and charts, graph and model

Using Excel for a Gradebook: Advanced Gradebook Formulas Objective 1: Review Screen Layout Excel 2007 offers a new user interface. The top portion of the window has a new structure for Excel commands.

### Microsoft Excel XP/2003, Level 300

SHARED COMPUTING SERVICES Updated 12/14/05 Logical Functions Use the IF Function =IF(Statement,IFtrue,IFfalse) Statement - comparison statement to which you try to match. IFtrue - result if the comparison

### Using Microsoft Excel

Using Microsoft Excel Key skill [Where it is introduced] To open MS Excel. To open an existing spreadsheet. How to do it! Start > All Programs > Microsost Office > Microsoft Office Excel 2003 File > Open

### Beginning Excel. Revised 5/01

Beginning Excel Objectives: The Learner will: Become familiar with terminology used in Microsoft Excel Create a simple workbook Write a simple formula Create a simple chart Sort a simple text chart Formatting

### Visual Basic Program: Temperature Conversion Program

C h a p t e r 4B Addendum Visual Basic Program: Temperature Conversion Program In this chapter, you will learn how to use the following Visual Basic Application functions to World Class standards: Writing

Excel 2003: Ringtones Task 1. Open up a blank spreadsheet 2. Save the spreadsheet to your area and call it Ringtones.xls 3. Add the data as shown here, making sure you keep to the cells as shown Make sure

### ADVANCED ROBOT PROGRAMMING LEGO MINDSTORMS EV3

ADVANCED ROBOT PROGRAMMING LEGO MINDSTORMS EV3 Presented by: Tom Bickford Maine Robotics Friday, 10/16/2015 1:30-3:30 2015 Description: So you've been using robotics in your classroom but want to take

### Visual Basic Lecture 2

Visual Basic Lecture 2 In Maple programming, we extensively used and manipulated variables in our programs with little or no regard to how the computer accessed or viewed those variables. In this set of

### Introduction to Microsoft Excel 2007

Screen Elements Introduction to Microsoft Excel 2007 Quick Access Toolbar The Ribbon Microsoft Office Button Formula Bar Expand Formula Bar Vertical Scroll Bar Worksheet Navigation Tabs Horizontal Scroll

### Chapter 2.3: VBA Primer. Barry L. Nelson Northwestern University December 2012

Chapter 2.3: VBA Primer Barry L. Nelson Northwestern University December 2012 1 Visual Basic for Applications VBA a significant subset of the stand alone Visual Basic programming language It is integrated

### SECTION 5: Finalizing Your Workbook

SECTION 5: Finalizing Your Workbook In this section you will learn how to: Protect a workbook Protect a sheet Protect Excel files Unlock cells Use the document inspector Use the compatibility checker Mark

### Summary of important mathematical operations and formulas (from first tutorial):

EXCEL Intermediate Tutorial Summary of important mathematical operations and formulas (from first tutorial): Operation Key Addition + Subtraction - Multiplication * Division / Exponential ^ To enter a

### Preface of Excel Guide

Preface of Excel Guide The use of spreadsheets in a course designed primarily for business and social science majors can enhance the understanding of the underlying mathematical concepts. In addition,

### Microsoft Office Excel 2007 and Spreadsheet Modeling David R. Anderson, Dennis J. Sweeney, Thomas A. Williams and Kipp Martin

89859_01_Excel_Primer.qxd 1/29/08 10:21 AM Page 1 Microsoft Office Excel 2007 and Spreadsheet Modeling David R. Anderson, Dennis J. Sweeney, Thomas A. Williams and Kipp Martin Microsoft Office Excel 2007

A Quick Tour of F9 Table of Contents I. A Quick Tour of F9... 1 1. Getting Started... 1 2. Quick Trial Balance... 5 3. A More Dynamic Trial Balance... 7 II. The Fundamental F9 Formula... 9 1. The GL Function...

### LabVIEW Day 3: Arrays and Clusters

LabVIEW Day 3: Arrays and Clusters Vern Lindberg By now you should be getting used to LabVIEW. You should know how to Create a Constant, Control, or Indicator. I will assume you know how to create a new

### Excel 2007 Basic knowledge

Ribbon menu The Ribbon menu system with tabs for various Excel commands. This Ribbon system replaces the traditional menus used with Excel 2003. Above the Ribbon in the upper-left corner is the Microsoft

### Microsoft Excel 2010 Lesson 4: Functions

Microsoft Excel 2010 Lesson 4: Functions Open the file Example.xlsx if is not already open. Mathematical and Statistical Functions Mathematical functions, not surprisingly, do routine mathematical calculations.

Advanced Excel: Pivot Tables Welcome to Advanced Excel: Pivot Tables. I m sure you re excited to get started on your journey into the depths of Microsoft Excel. In this course we will cover: Pivot Tables

### Spreadsheet Concepts Using Microsoft Excel

lab Spreadsheet Concepts Using Microsoft Excel Objectives: Upon successful completion of Lab 5, you will be able to Create and edit a simple spreadsheet document Describe the advantage of using formulas

### Creating a Database using Access 2007

Creating a Database using Access 2007 Starting Access 2007 Double click on the Access 2007 icon on the Windows desktop (see right), or click-on the Start button in the lower left corner of the screen,

### Result Entry by Spreadsheet User Guide

Result Entry by Spreadsheet User Guide Created in version 2007.3.0.1485 1/50 Table of Contents Result Entry by Spreadsheet... 3 Result Entry... 4 Introduction... 4 XML Availability... 4 Result Entry...

### 0 Introduction to Data Analysis Using an Excel Spreadsheet

Experiment 0 Introduction to Data Analysis Using an Excel Spreadsheet I. Purpose The purpose of this introductory lab is to teach you a few basic things about how to use an EXCEL 2010 spreadsheet to do

### Spreadsheet View and Basic Statistics Concepts

Spreadsheet View and Basic Statistics Concepts GeoGebra 3.2 Workshop Handout 9 Judith and Markus Hohenwarter www.geogebra.org Table of Contents 1. Introduction to GeoGebra s Spreadsheet View 2 2. Record

### How to Make Animated Graphs. 2. Select the cells highlighted in yellow, and click on the chart wizard. Create an x-y scatter chart.

How to Make Animated Graphs This tutorial will walk you through the steps of creating a simple animated graph in Excel. The end product is an animated scatter plot (similar to Gapminder World), but the

### How to use Microsoft Excel 2007

Microsoft Office Excel is a powerful tool used to create and format spreadsheets. Spreadsheets allow information to be organized in rows and tables and analyzed with automatic mathematics. Spreadsheets

### Appendix A: Using the Microsoft Excel Spreadsheet Software

Appendix A: Using the Microsoft Excel Spreadsheet Software In this course you will be using the Microsoft spreadsheet program Excel to work up most of your data. This handout is intended to help you to

### Word 2010: Mail Merge to Email with Attachments

Word 2010: Mail Merge to Email with Attachments Table of Contents TO SEE THE SECTION FOR MACROS, YOU MUST TURN ON THE DEVELOPER TAB:... 2 SET REFERENCE IN VISUAL BASIC:... 2 CREATE THE MACRO TO USE WITHIN

Formatting an Excel Spreadsheet Change Cell Size To center a title across a range of cells, highlight the cells and select the merge and center button from the toolbar. To make a cell the width of the

### 1. Math symbols Operation Symbol Example Order

Excel 2 Microsoft Excel 2013 Mercer County Library System Brian M. Hughes, County Executive Excel s Order of Calculation 1. Math symbols Operation Symbol Example Order Parentheses ( ) =(4+2)*8 1st Exponents

### warpct.com Working with MS Excel 2003 Workbook courseware by WARP! Computer Training

warpct.com courseware by WARP! Computer Training Working with MS Excel 2003 Workbook Welcome! Thank you for evaluating a portion of this workbook. If you have any questions or comments regarding our training

The Center for Teaching Excellence Table of Contents Basics... 1 What is a spreadsheet... 1 Why on a computer... 1 Basics of a spreadsheet... 1 Types of data... 1 Formatting... 1 Organize content in rows

### Excel: Beyond the Basics

Excel: Beyond the Basics Trainer Name Trainer/Consultant PowerSchool University 2012 Agenda Welcome and Introductions Understanding Basic Excel Concepts Using Formulas and Functions in Excel Formatting

### Creating a Pivot Table

Creating a Pivot Table Basic information: A pivot table is an Excel function using any data set on a spreadsheet to provide a summary. The data should be in consecutive rows and have labels at the top

### INTRODUCTION TO MICROSOFT EXCEL 2010 Creating a Basic Spreadsheet

INTRODUCTION TO MICROSOFT EXCEL 2010 Creating a Basic Spreadsheet Documented by Vincent J. Yanusauskas Computer Training Coordinator Table of Contents Introduction... 1 Backstage View... 1 Quick access

### 1. a procedure that you perform frequently. 2. Create a command. 3. Create a new. 4. Create custom for Excel.

Topics 1 Visual Basic Application Macro Language What You Can Do with VBA macro Types of VBA macro Recording VBA macros Example: MyName () If-Then statement Example: CheckCell () For-Next Loops Example:

### Excel Lesson 4 Entering Worksheet Formulas

Excel Lesson 4 Entering Worksheet Formulas Microsoft Office 2007: Introductory t 1 Objectives Enter and edit formulas. Distinguish between relative, absolute, and mixed cell references. Use the point-and-click

### 1. Create a spreadsheet including starting from scratch or template. When you start excel, it opens in an empty workbook. Most of us start there.

Technical Assistance: Website: http://help.asu.edu Help Desk Phone: 1.855.278.5080 (24/7 support) Instruction 1. Create a spreadsheet including starting from scratch or template When you start excel, it

### ECDL Module 4 Notes. Module 4: Spreadsheet. 4.1 Using the Application Working with Spreadsheets

ECDL Module 4 Notes Module 4: Spreadsheet 4.1 Using the Application 4.1.1 Working with Spreadsheets 4.1.1.1 Open, close spreadsheet application. Open, close spreadsheets Opening the Microsoft Excel Application

### Excel & Visual Basic for Applications (VBA)

Excel & Visual Basic for Applications (VBA) The VBA Programming Environment Recording Macros Working with the Visual Basic Editor (VBE) 1 Why get involved with this programming business? If you can't program,

### Construction Administrators Work Smart with Excel Programming and Functions. OTEC 2014 Session 78 Robert Henry

Construction Administrators Work Smart with Excel Programming and Functions OTEC 2014 Session 78 Robert Henry Cell References C O P Y Clicking into the Formula Bar or the Active Cell will cause color coded

### Producing a Gantt Chart Using Microsoft Excel s Bar Graph Functionality

Producing a Gantt Chart Using Microsoft Excel s Bar Graph Functionality Introduction Gantt Charts are used in a variety of settings, especially when complex projects are implemented. Gantt Charts give

### Check out our website!

Check out our website! www.nvcc.edu/woodbr idge/computer-lab Contact Us Location: Open Computer Lab Seefeldt Building #336 NOVA Woodbridge Campus Hussna Azamy (OCL Supervisor) Phone: 703-878-5714 E-mail:

### Excel 2003 Tutorial I

This tutorial was adapted from a tutorial by see its complete version at http://www.fgcu.edu/support/office2000/excel/index.html Excel 2003 Tutorial I Spreadsheet Basics Screen Layout Title bar Menu bar

### Introduction to Microsoft Excel 1 Part I

Introduction to Microsoft Excel 1 Part I Objectives When you complete this workshop you will be able to: Recognize Excel s basic operations and tools; Develop simple worksheets; Use formulas; Format worksheets;

### b) lower case always use lower case for all matlab commands. This is what matlab recognizes.

1 Matlab 1) Fundamentals a) Getting Help for more detailed help on any topic, typing help, then a space, and then the matlab command brings up a detailed page on the command or topic. For really difficult

### Electronic spreadsheets have become an

Chapter 2 Introduction to Electronic Spreadsheets Electronic spreadsheets have become an essential management tool. Throughout this book there are references to Microsoft s Excel spreadsheet software program.

### Excel 2007 Tutorial - Draft

These notes will serve as a guide and reminder of several features in Excel 2007 that make the use of a spreadsheet more like an interactive thinking tool. The basic features/options to be explored are:

Page 0 German University in Cairo Media Engineering and Technology Prof. Dr. Slim Abdennadher Introduction to Computer Science, Winter 2015 Microsoft Excel 2013 1 Spreadsheet Processing 1.1 Spreadsheet

### EXCEL PIVOT TABLE David Geffen School of Medicine, UCLA Dean s Office Oct 2002

EXCEL PIVOT TABLE David Geffen School of Medicine, UCLA Dean s Office Oct 2002 Table of Contents Part I Creating a Pivot Table Excel Database......3 What is a Pivot Table...... 3 Creating Pivot Tables

### Excel 2010 & Your Data

Campus Training & Teaching and Learning Center Excel 2010 & Your Data Microsoft Office 2010 Series & Your Data Table of Contents Page 1.0 Overview... 3 1.1 Before you begin... 3 2.0 Environment... 3 2.1

### Chapter 4 Displaying and Describing Categorical Data

Chapter 4 Displaying and Describing Categorical Data Chapter Goals Learning Objectives This chapter presents three basic techniques for summarizing categorical data. After completing this chapter you should

### The Center for Teaching, Learning, & Technology

The Center for Teaching, Learning, & Technology Instructional Technology Workshops Microsoft Excel 2010 Formulas and Charts Albert Robinson / Delwar Sayeed Faculty and Staff Development Programs Colston

### Introduction to Microsoft Excel 2010

Introduction to Microsoft Excel 2010 THE BASICS PAGE 02 What is Microsoft Excel? Important Microsoft Excel Terms Opening Microsoft Excel 2010 The Title Bar Page View, Zoom, and Sheets MENUS...PAGE 03 Quick

### Microsoft Excel 2010 Basics

Microsoft Excel 2010 Basics 1. Start Excel if the Excel 2010 icon is not on the desktop: a. Click Start>Programs>Microsoft Office>Microsoft Excel 2010 b. The Ribbon- seen across the top of Microsoft Excel.

### Programming in Access VBA

PART I Programming in Access VBA In this part, you will learn all about how Visual Basic for Applications (VBA) works for Access 2010. A number of new VBA features have been incorporated into the 2010

### Advanced. Interactive Multimedia Presentation. Name: Class: Teacher: Developed by Tim Gamble

Advanced Interactive Multimedia Presentation Name: Class: Teacher: Developed by Tim Gamble From your last presentation, you learnt how to add interactivity to your presentation. You used action buttons,

### Excel Guide for Finite Mathematics and Applied Calculus

Excel Guide for Finite Mathematics and Applied Calculus Revathi Narasimhan Kean University A technology guide to accompany Mathematical Applications, 6 th Edition Applied Calculus, 2 nd Edition Calculus:

### What is Microsoft Excel?

What is Microsoft Excel? Microsoft Excel is a member of the spreadsheet family of software. Spreadsheets allow you to keep track of data, create charts based from data, and perform complex calculations.

### Access Tutorial 12: An Introduction to Visual Basic

Access Tutorial 12: An Introduction to Visual Basic 12.1 Introduction: Learning the basics of programming Programming can be an enormously complex and difficult activity. Or it can be quite straightforward.

### Assignment 1 supplement: Using Microsoft Excel

Derivative Securities, Fall Semester, 2010 http://www.math.nyu.edu/faculty/goodman/teaching/derivsec10/index.html Assignment 1 supplement: Using Microsoft Excel There are many helpful web sites and books