Kipp Martin. January 25, 2012

Size: px
Start display at page:

Download "Kipp Martin. January 25, 2012"

Transcription

1 Workbooks, Worksheets, and Arrays (Chapters 8 ( ), 9 of Albright Ed 3) (Chapters 8 ( ), 9 of Albright Ed 4) (Chapter 13 (Section 6) of Albright Ed 3 & 4) Kipp Martin January 25, 2012

2 Excel Files Files used in this lecture: workbooksdemo.xlsm fileio.xlsm arrays.xlsm

3 Outline Workbooks and Worksheets Text Files Arrays

4 Workbooks, Worksheet, and Arrays Motivation: Data not always in a single worksheet! Data that is needed for a model may reside in multiple worksheets in a workbook. (This lecture) Data that is needed for a model may reside in multiple workbooks. (This lecture) Data that is needed for a model may reside in text files. (This lecure) Data that is needed for a model may reside in XML files. (later) Data that is needed for a model may reside on the Web. (later) Data that is needed for a model may reside in relational data bases (Access, SQL Server, Oracle, DB2) (later)

5 Workbooks, Worksheet, and Arrays Central Idea: Work with a collection of objects. In this case we work with Workbooks and Worksheets. Note the plural. Class hierarchy is critical!

6 Workbooks, Worksheet, and Arrays Here is how I might refer to a range: Workbooks("CustData").Worksheets("Cust1").Range("Sales") The hierarchy is: A Workbook CustData A Worksheet Cust1 A Range Sales Note: for this to work the workbook CustData must be open.

7 Workbooks, Worksheet, and Arrays Useful Task One: Looping over the Workbooks collection Dim wb As Workbook For Each wb In Application.Workbooks MsgBox wb.name Next Useful Task Two: Looping over the Worksheets collection Dim ws As Worksheet For Each ws In ActiveWorkbook.Worksheets MsgBox ws.name Next

8 Workbooks, Worksheet, and Arrays Useful Task Three: Looping over all Ranges (range names are members of the Workbook, not individual worksheets) For Each wb In Application.Workbooks wb.activate MsgBox wb.name numranges = wb.names.count For i = 1 To numranges Debug.Print ActiveWorkbook.Names.Item(i).Name Next i Next

9 Workbooks, Worksheet, and Arrays Useful Task Four: Open a closed Workbook. You may want your application to open a closed workbook. Assume the Workbook studentscores.xlsm is in the C directory root. Sub OpenCloseWorkbooks() Dim filename As String filename = "C:\studentscores.xlsm" Workbooks.Open filename Now close it Workbooks("studentscores.xlsm").Close End Sub

10 Workbooks, Worksheet, and Arrays Useful Task Five: Saving a workbook under a different name or in a different directory. With ActiveWorkbook just save where it is under current name.save do a save as.saveas filename:="c:\test.xlsm" End With Useful Task Six: Determining which directory a workbook is in. MsgBox ThisWorkbook.Path

11 Workbooks, Worksheet, and Arrays Useful Task Seven: Hiding a worksheet. Why do this? For Each wb In Application.Workbooks If wb.name = "workbooksdemo.xlsm" Then For Each ws In wb.worksheets Set ws = Worksheets(ws.Name) If ws.name = "Sheet2" Then _ ws.visible = xlsheethidden Next End If Next

12 Workbooks, Worksheet, and Arrays 12 Useful Task Eight: Executing code when a workbook opens. See Section 10.7 of Albright. Basic Idea: It is often useful to execute code when a workbook is opened (this is an event). Perhaps opening a specific worksheet. Create a procedure named Workbook Open() and put it in the ThisWorkbook section of the project. Private Sub Workbook_Open() MsgBox "Hello World" Worksheets("Sheet1").Activate End Sub See also Workbook BeforeClose

13 Workbooks, Worksheet, and Arrays Useful Task Eight (Continued): Executing code when for all Workbooks when they open. See for information on putting a macro in your PERSONAL.XLSB workbook. Private Sub Workbook_Open() Application.OnKey "{F5}", "" End Sub

14 Text Files We need to read and write simple text files. First, how to write a simple text file. We write the information from a range to a text file. Step1: Open the file Step 2: Write the range information to a string Step 3: Write the string to the file Step 4: Close the file

15 Step 1: Open the file Text Files testfile = "C:\temp\data.txt" Mac OS X testfile = "MacIntosh HD:Users:kmartin:temp:data.txt" Open testfile For Output As #1 Step 2: Write range information to the string. filedata = "" For I = 1 To numrows For J = 1 To numcols filedata = filedata & rng.cells(i, J) & vbtab Next J go to a new line filedata = filedata & vbcrlf Next I

16 Text Files Step 2 (Continued): Write range information to the string. Note the use of: vbtab vbcrlf Step 3: Write the string to the file Print #1, filedata Step 4: Close the file Close #1

17 Text Files Now reverse the process and read a text file. Step1: Open the file Step 2: Read the information line by line into a string Step 3: Parse (argle bargle) the string Step 4: Close the file

18 Text Files Step1: Open the file testfile = "C:\temp\data.txt" Mac OS X testfile = "MacIntosh HD:Users:kmartin:temp:data.txt" Open testfile For Input As #1 Step 2: Read the information line by line into a string Do Until EOF(1) Line Input #1, dataline Debug.Print dataline Loop

19 Text Files Step 3: Parse the string not illustrated here. See Section Not an easy task in general. Step 4: Close the file. Close #1

20 Text Files Text files are great: platform independent more secure over a network most software packages (word processors, spreadsheet, database) read and write text files. truly the lowest common denominator The Bad: hard to express complicated data structures in text files The Solution: XML

21 Arrays There is an Array construct in VBA. This construct is similar to a range in an Excel worksheet. In fact, you could probably get by without arrays and just work with Range objects. But arrays make your life much easier. And faster! Arrays can make the code much cleaner. You do not constantly have to work with the Cells or Offset properties. Arrays makes it very easy to pass back and forth large amounts of data between functions and procedures using an array as an argument. You don t have to constantly figure out where you want to be in a range. Arrays are very convenient for storing temporary information that you don t want to write out to an Excel Range. Using an array index is a very fast and efficient way to refer to a number, string, or object in memory location.

22 Arrays 22 An array should be declared like any other variable. An example declaration: Dim x(10) As Double This allocates a double array with 10 as the largest subscript value. VBA knows that this is an array because of the (10) as part of the x variable. By default, Excel VBA uses zero-based counting. This means that x(0) is the first element and x(10) is the last element. In general, x(i) indexes element i + 1 with zero-based counting.

23 Arrays With Option Base set to 0 the statement Dim x(100) As Double will create a an array with 101 elements. This is NOT true in C, C++, or Java. What the author says about this on the bottom of page 156 (about employee) is wrong.

24 Arrays Zero-based counting is also used in the C, C++, and Java programming languages. It is relatively recent addition to VBA. Many people find this confusing. There are two ways to specify one-based counting which is what a lot of people are used to using. Specify the start and end of the array. For example: Dim x(1 To 10) Double At the start of the module declare one-based counting as the default Option Base 1

25 Arrays By default, a statement such as Dim x(10) As Double will initialize all elements of the x array to zero. You can also do something like this: Dim z As Variant z = Array(1.2, 3, 5, 8.9, 9, 11) This initializes z to have the six elements given above.

26 Arrays There is a VBA function UBound that takes an array as the argument and returns the largest subscript, not the number of elements in the array. Consider the following code: Dim x(10) As Double Debug.Print UBound(x) This code will produce the value of 10 for the size of the array regardless of 0 or 1 based counting. There is a VBA function LBound that takes an array as the argument and returns the smallest subscript. The number of elements in the array is: UBound( x) - LBound( x) + 1

27 Arrays You can declare multi-dimensional arrays. The following example calculates the sum product of two tables. (Assume one-based counting.) Dim table1(5, 10) As Double Dim table2(5, 10) As Double Dim i As Double, j As Double Dim total As Double For i = 1 To 5 For j = 1 To 10 total = total + table1(i, j)*table2(i, j) Next j Next i

28 Arrays You can declare dynamic arrays. Use the ReDim statement once you know the size of the array. Read a range of midterm scores into an array Define a dynamic array Dim midterms() As Double Dim rng As Range With Range("A1") Set rng = Range(.Offset(1, 4), _.Offset(1, 4).End(xlDown)) End With Dim numrows As Integer numrows = rng.rows.count ReDim midterms(numrows) Dim i As Integer For i = 1 To numrows midterms(i) = rng.cells(i) Next i

29 Arrays You can ReDim arrays multiple times. If you do this you may wish to use the Preserve keyword. Sub Demo_Preserve() Demo use of ReDim and Preserve Dim i As Integer Dim x() As Double ReDim x(2) x(1) = 1 x(2) = 2 ReDim x(3) try with and without statement below ReDim Preserve x(3) x(3) = 3 For i = 1 To 3 Debug.Print x(i) Next i End Sub

30 Arrays 30 See the procedures Total Sales1() and Total Sales2() for a good illustration of using arrays. In these procedures we find unique sku numbers and then aggregate sales for each sku. The Total Sales2() macro illustrates use of IsEmpty().

31 Using IsEmpty(): Arrays Do While IsEmpty(rng.Cells(i, 1)) = False isunique = True For j = 1 To numunique see if this sku is already there If rng.cells(i, 1) = unique_sku(j) Then get out of loop, not a unique sku update the total total(j) = total(j) + rng.cells(i, 3).. other logic. i = i + 1 Loop

Visual Basic: Objects and collections

Visual Basic: Objects and collections : Objects and collections is an (OO) object-oriented language. Performing a task in (VB) or for Applications (VBA) involves manipulating various types of objects, each of which may have several different

More information

Using the For Each Statement to 'loop' through the elements of an Array

Using the For Each Statement to 'loop' through the elements of an Array Using the For Each Statement to 'loop' through the elements of an Array This month's article was inspired by a Visual Basic tip I saw recently that touted the advantages of using LBound and Ubound functions

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

Excel & Visual Basic for Applications (VBA)

Excel & Visual Basic for Applications (VBA) Excel & Visual Basic for Applications (VBA) Object-oriented programming (OOP) Procedures: Subs and Functions, layout VBA: data types, variables, assignment 1 Traits of Engineers Florman s Engineering View

More information

Connecting to an Excel Workbook with ADO

Connecting to an Excel Workbook with ADO Connecting to an Excel Workbook with ADO Using the Microsoft Jet provider ADO can connect to an Excel workbook. Data can be read from the workbook and written to it although, unlike writing data to multi-user

More information

Visual Basic Programming. An Introduction

Visual Basic Programming. An Introduction Visual Basic Programming An Introduction Why Visual Basic? Programming for the Windows User Interface is extremely complicated. Other Graphical User Interfaces (GUI) are no better. Visual Basic provides

More information

MATLAB: Structures and Cell Arrays

MATLAB: Structures and Cell Arrays MATLAB: Structures and Cell Arrays Kipp Martin University of Chicago Booth School of Business February 16, 2012 The M-files The following files are used in this lecture. studentstruct.mat stockdata.mat

More information

Name = array(x,y,...,z) the indexing starts at zero, i.e. Name(0) = x. Programming Excel/VBA Part II (A.Fring)

Name = array(x,y,...,z) the indexing starts at zero, i.e. Name(0) = x. Programming Excel/VBA Part II (A.Fring) Arrays/Array functions Arrays are VBA variables which can store more than one item. the items held in an array are all of the same variable type one refers to an item by the array name and a number syntax:

More information

Programming in Access VBA

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

More information

Excel & Visual Basic for Applications (VBA)

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,

More information

The FTS Real Time System lets you create algorithmic trading strategies, as follows:

The FTS Real Time System lets you create algorithmic trading strategies, as follows: Algorithmic Trading The FTS Real Time System lets you create algorithmic trading strategies, as follows: You create the strategy in Excel by writing a VBA macro function The strategy can depend on your

More information

Providing Password Protection to Excel Reports for Distribution in Emails

Providing Password Protection to Excel Reports for Distribution in Emails Providing Password Protection to Excel Reports for Distribution in Emails Applies to: BusinessObjects Enterprise XI 3.1 SP2. For more information, visit the Business Objects homepage. Summary This paper

More information

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

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:

More information

Microsoft' Excel & Access Integration

Microsoft' Excel & Access Integration Microsoft' Excel & Access Integration with Office 2007 Michael Alexander and Geoffrey Clark J1807 ; pwiueyb Wiley Publishing, Inc. Contents About the Authors Acknowledgments Introduction Part I: Basic

More information

Unleashing Hidden Powers of Inventor with the API Part 1. Getting Started with Inventor VBA Hello Inventor!

Unleashing Hidden Powers of Inventor with the API Part 1. Getting Started with Inventor VBA Hello Inventor! Unleashing Hidden Powers of Inventor with the API Part 1. Getting Started with Inventor VBA Hello Inventor! Brian Ekins Autodesk, Inc. This article provides an introduction to Inventor's VBA programming

More information

RIT Installation Instructions

RIT Installation Instructions RIT User Guide Build 1.00 RIT Installation Instructions Table of Contents Introduction... 2 Introduction to Excel VBA (Developer)... 3 API Commands for RIT... 11 RIT API Initialization... 12 Algorithmic

More information

VBA and Macros for Microsoft Excel. Copyright 2004 by Que Publishing. International Standard Book Number: 0789731290. Warning and Disclaimer

VBA and Macros for Microsoft Excel. Copyright 2004 by Que Publishing. International Standard Book Number: 0789731290. Warning and Disclaimer VBA and Macros for Microsoft Excel Copyright 2004 by Que Publishing International Standard Book Number: 0789731290 Warning and Disclaimer Every effort has been made to make this book as complete and as

More information

The FTS Interactive Trader lets you create program trading strategies, as follows:

The FTS Interactive Trader lets you create program trading strategies, as follows: Program Trading The FTS Interactive Trader lets you create program trading strategies, as follows: You create the strategy in Excel by writing a VBA macro function The strategy can depend on your position

More information

Introducing VBA Message Boxes

Introducing VBA Message Boxes Introducing VBA Message Boxes It's All About Communication When you build a tool for someone else to use it is important that that person, "the user", knows what's going on and feels confident using it.

More information

Automating PrecisionTree with VBA

Automating PrecisionTree with VBA Automating PrecisionTree with VBA The purpose of this document is to introduce PrecisionTree s Excel Developer Kit (XDK) and explain how you can use VBA to automate PrecisionTree. The term automate simply

More information

VBA PROGRAMMING FOR EXCEL FREDRIC B. GLUCK 608-698-6304

VBA PROGRAMMING FOR EXCEL FREDRIC B. GLUCK 608-698-6304 VBA PROGRAMMING FOR EXCEL FREDRIC B. GLUCK FGLUCK@MADISONCOLLEGE.EDU FBGLUCK@GMAIL.COM 608-698-6304 Text VBA and Macros: Microsoft Excel 2010 Bill Jelen / Tracy Syrstad ISBN 978-07897-4314-5 Class Website

More information

The following tips have been copied from the following website: http://www.angelfire.com/biz7/julian_s/julian/julians_macros.htm

The following tips have been copied from the following website: http://www.angelfire.com/biz7/julian_s/julian/julians_macros.htm Julian s Macro Tips The following tips have been copied from the following website: http://www.angelfire.com/biz7/julian_s/julian/julians_macros.htm An additional extensive resource is provided by JoJo

More information

THE HELLO WORLD PROJECT

THE HELLO WORLD PROJECT Paper RIV-08 Yes! SAS ExcelXP WILL NOT Create a Microsoft Excel Graph; But SAS Users Can Command Microsoft Excel to Automatically Create Graphs From SAS ExcelXP Output William E Benjamin Jr, Owl Computer

More information

OpenOffice.org 3.2 BASIC Guide

OpenOffice.org 3.2 BASIC Guide OpenOffice.org 3.2 BASIC Guide Copyright The contents of this document are subject to the Public Documentation License. You may only use this document if you comply with the terms of the license. See:

More information

Introduction. Why (GIS) Programming? Streamline routine/repetitive procedures Implement new algorithms Customize user applications

Introduction. Why (GIS) Programming? Streamline routine/repetitive procedures Implement new algorithms Customize user applications Introduction Why (GIS) Programming? Streamline routine/repetitive procedures Implement new algorithms Customize user applications 1 Computer Software Architecture Application macros and scripting - AML,

More information

Visual Basic - Modules and Procedures

Visual Basic - Modules and Procedures Visual Basic - Modules and Procedures Introduction A procedure is a unit of code enclosed either between the Sub and statements or between the Function and statements. A procedure should accomplish a simple

More information

Working with Macros and VBA in Excel 2007

Working with Macros and VBA in Excel 2007 Working with Macros and VBA in Excel 2007 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

More information

Module 2 - Multiplication Table - Part 1-1

Module 2 - Multiplication Table - Part 1-1 Module 2 - Multiplication Table - Part 1 TOPICS COVERED: 1) VBA and VBA Editor (0:00) 2) Arrays (1:15) 3) Creating a Multiplication Table (2:34) 4) TimesTable Subroutine (3:08) 5) Improving Efficiency

More information

MAS 500 Intelligence Tips and Tricks Booklet Vol. 1

MAS 500 Intelligence Tips and Tricks Booklet Vol. 1 MAS 500 Intelligence Tips and Tricks Booklet Vol. 1 1 Contents Accessing the Sage MAS Intelligence Reports... 3 Copying, Pasting and Renaming Reports... 4 To create a new report from an existing report...

More information

Using Loops to Repeat Code

Using Loops to Repeat Code Using s to Repeat Code Why You Need s The macro recording tools in Microsoft Word and Microsoft Excel make easy work of creating simple coding tasks, but running a recorded macro is just that you do a

More information

Moving from C++ to VBA

Moving from C++ to VBA Introduction College of Engineering and Computer Science Mechanical Engineering Department Mechanical Engineering 309 Numerical Analysis of Engineering Systems Fall 2014 Number: 15237 Instructor: Larry

More information

Classes and Objects in Java Constructors. In creating objects of the type Fraction, we have used statements similar to the following:

Classes and Objects in Java Constructors. In creating objects of the type Fraction, we have used statements similar to the following: In creating objects of the type, we have used statements similar to the following: f = new (); The parentheses in the expression () makes it look like a method, yet we never created such a method in our

More information

Simply Accounting Intelligence Tips and Tricks Booklet Vol. 1

Simply Accounting Intelligence Tips and Tricks Booklet Vol. 1 Simply Accounting Intelligence Tips and Tricks Booklet Vol. 1 1 Contents Accessing the SAI reports... 3 Running, Copying and Pasting reports... 4 Creating and linking a report... 5 Auto e-mailing reports...

More information

Applications Development

Applications Development Paper 21-25 Using SAS Software and Visual Basic for Applications to Automate Tasks in Microsoft Word: An Alternative to Dynamic Data Exchange Mark Stetz, Amgen, Inc., Thousand Oaks, CA ABSTRACT Using Dynamic

More information

One Dimension Array: Declaring a fixed-array, if array-name is the name of an array

One Dimension Array: Declaring a fixed-array, if array-name is the name of an array Arrays in Visual Basic 6 An array is a collection of simple variables of the same type to which the computer can efficiently assign a list of values. Array variables have the same kinds of names as simple

More information

Hands-on Exercise 1: VBA Coding Basics

Hands-on Exercise 1: VBA Coding Basics Hands-on Exercise 1: VBA Coding Basics This exercise introduces the basics of coding in Access VBA. The concepts you will practise in this exercise are essential for successfully completing subsequent

More information

Automating @RISK with VBA

Automating @RISK with VBA Automating @RISK with VBA The purpose of this document is to introduce the @RISK Excel Developer Kit (XDK) and explain how you can use VBA to automate @RISK. 1 The term automate simply means that you write

More information

Best STL Courses never cancelled: guaranteed Last minute rescheduling 24 months access to Microsoft trainers 12+ months schedule UK wide delivery

Best STL Courses never cancelled: guaranteed Last minute rescheduling 24 months access to Microsoft trainers 12+ months schedule UK wide delivery Microsoft Application Series Excel VBA Advanced Best STL Courses never cancelled: guaranteed Last minute rescheduling 24 months access to Microsoft trainers 12+ months schedule UK wide delivery www.microsofttraining.net

More information

Financial Data Access with SQL, Excel & VBA

Financial Data Access with SQL, Excel & VBA Computational Finance and Risk Management Financial Data Access with SQL, Excel & VBA Guy Yollin Instructor, Applied Mathematics University of Washington Guy Yollin (Copyright 2012) Data Access with SQL,

More information

Creating Basic Excel Formulas

Creating Basic Excel Formulas Creating Basic Excel Formulas Formulas are equations that perform calculations on values in your worksheet. Depending on how you build a formula in Excel will determine if the answer to your formula automatically

More information

What is a database? COSC 304 Introduction to Database Systems. Database Introduction. Example Problem. Databases in the Real-World

What is a database? COSC 304 Introduction to Database Systems. Database Introduction. Example Problem. Databases in the Real-World COSC 304 Introduction to Systems Introduction Dr. Ramon Lawrence University of British Columbia Okanagan ramon.lawrence@ubc.ca What is a database? A database is a collection of logically related data for

More information

Visual Basic Cheat Sheet

Visual Basic Cheat Sheet thecodingguys 2013 Visual Basic Cheat Sheet 12/24/2013 A cheat sheet to the Visual Basic language, ideal for newcomers to the language for more visit http://www.thecodingguys.net KEEP IN TOUCH TABLE OF

More information

The University of Chicago Booth School of Business 36104 Tools for Business Analysis: Excel and Matlab Winter, 2012.

The University of Chicago Booth School of Business 36104 Tools for Business Analysis: Excel and Matlab Winter, 2012. The University of Chicago Booth School of Business 36104 Tools for Business Analysis: Excel and Matlab Winter, 2012 Kipp Martin 430 Harper Center 773-702-7456 (Office) e-mail: kmartin@chicagobooth.edu

More information

Sources: On the Web: Slides will be available on:

Sources: On the Web: Slides will be available on: C programming Introduction The basics of algorithms Structure of a C code, compilation step Constant, variable type, variable scope Expression and operators: assignment, arithmetic operators, comparison,

More information

VBA and Databases (see Chapter 14 )

VBA and Databases (see Chapter 14 ) VBA and Databases (see Chapter 14 ) Kipp Martin February 29, 2012 Lecture Files Files for this module: retailersql.m retailer.accdb Outline 3 Motivation Modern Database Systems SQL Bringing Data Into MATLAB/Excel

More information

PULSE Automation programming in Visual Basic. From BK training lectures arranged by Jiří Tůma & Radovan Zadražil

PULSE Automation programming in Visual Basic. From BK training lectures arranged by Jiří Tůma & Radovan Zadražil PULSE Automation programming in Visual Basic From BK training lectures arranged by Jiří Tůma & Radovan Zadražil OLE Automation, general principles Bruno S. Larsen PULSE Software Development Agenda Overview

More information

Building a Marketing Dashboard using Excel and SAS. Tim Walters InfoTech Marketing

Building a Marketing Dashboard using Excel and SAS. Tim Walters InfoTech Marketing Building a Marketing Dashboard using Excel and SAS Tim Walters InfoTech Marketing 1 Desired Outcome Dashboard Sheet and 6 Results Sheets 2 Client Environmental Considerations Client company has software

More information

VB.NET Programming Fundamentals

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

More information

Multiple Choice: 2 points each

Multiple Choice: 2 points each MID TERM MSF 503 Modeling 1 Name: Answers go here! NEATNESS COUNTS!!! Multiple Choice: 2 points each 1. In Excel, the VLOOKUP function does what? Searches the first row of a range of cells, and then returns

More information

A Comparison of SAS versus Microsoft Excel and Access s Inbuilt VBA Functionality

A Comparison of SAS versus Microsoft Excel and Access s Inbuilt VBA Functionality A Comparison of SAS versus Microsoft Excel and Access s Inbuilt VBA Functionality Jozef Tarrant, Amadeus Software Ltd. Copyright 2011 Amadeus Software Ltd. 1 Overview What is VBA? VBA Essentials: Modules

More information

Pseudo code Tutorial and Exercises Teacher s Version

Pseudo code Tutorial and Exercises Teacher s Version Pseudo code Tutorial and Exercises Teacher s Version Pseudo-code is an informal way to express the design of a computer program or an algorithm in 1.45. The aim is to get the idea quickly and also easy

More information

Like any function, the UDF can be as simple or as complex as you want. Let's start with an easy one...

Like any function, the UDF can be as simple or as complex as you want. Let's start with an easy one... Building Custom Functions About User Defined Functions Excel provides the user with a large collection of ready-made functions, more than enough to satisfy the average user. Many more can be added by installing

More information

SPSS: Getting Started. For Windows

SPSS: Getting Started. For Windows For Windows Updated: August 2012 Table of Contents Section 1: Overview... 3 1.1 Introduction to SPSS Tutorials... 3 1.2 Introduction to SPSS... 3 1.3 Overview of SPSS for Windows... 3 Section 2: Entering

More information

A Comparison of SAS versus Microsoft Excel and Access s Inbuilt VBA Functionality Jozef Tarrant, Amadeus Software Ltd., Oxford, UK

A Comparison of SAS versus Microsoft Excel and Access s Inbuilt VBA Functionality Jozef Tarrant, Amadeus Software Ltd., Oxford, UK ABSTRACT There are a great variety of business situations where it is necessary to automatically export data from a large number of similar Microsoft Excel spreadsheets (perhaps reports, forms etc.) into

More information

A universal method to create complex reports in Excel

A universal method to create complex reports in Excel A universal method to create complex reports in Excel 1 Introduction All organizations have the need for creating reports and to analyze data. There are many suppliers, tools and ideas how to accomplish

More information

Lecture 2. Binary and Hexadecimal Numbers

Lecture 2. Binary and Hexadecimal Numbers Lecture 2 Binary and Hexadecimal Numbers Purpose: Review binary and hexadecimal number representations Convert directly from one base to another base Review addition and subtraction in binary representations

More information

Introduction to Visual Basic and Visual C++ Database Foundation. Types of Databases. Data Access Application Models. Introduction to Database System

Introduction to Visual Basic and Visual C++ Database Foundation. Types of Databases. Data Access Application Models. Introduction to Database System Introduction to Visual Basic and Visual C++ Database Foundation Lesson 8 Introduction to Database System I154-1-A A @ Peter Lo 2010 1 I154-1-A A @ Peter Lo 2010 2 Data Access Application Models Types of

More information

G563 Quantitative Paleontology. SQL databases. An introduction. Department of Geological Sciences Indiana University. (c) 2012, P.

G563 Quantitative Paleontology. SQL databases. An introduction. Department of Geological Sciences Indiana University. (c) 2012, P. SQL databases An introduction AMP: Apache, mysql, PHP This installations installs the Apache webserver, the PHP scripting language, and the mysql database on your computer: Apache: runs in the background

More information

Excel Reporting with 1010data

Excel Reporting with 1010data Excel Reporting with 1010data (212) 405.1010 info@1010data.com Follow: @1010data www.1010data.com Excel Reporting with 1010data Contents 2 Contents Overview... 3 Start with a 1010data query... 5 Running

More information

KITES TECHNOLOGY COURSE MODULE (C, C++, DS)

KITES TECHNOLOGY COURSE MODULE (C, C++, DS) KITES TECHNOLOGY 360 Degree Solution www.kitestechnology.com/academy.php info@kitestechnology.com technologykites@gmail.com Contact: - 8961334776 9433759247 9830639522.NET JAVA WEB DESIGN PHP SQL, PL/SQL

More information

Crystal Reports. Overview. Contents. Advanced Reporting Techniques using Arrays

Crystal Reports. Overview. Contents. Advanced Reporting Techniques using Arrays Advanced Reporting Techniques using Arrays Overview Contents This document is intended to assist you to understand, build, and manipulate Arrays in the Crystal Reports Designer and the Seagate Info Report

More information

LabVIEW Report Generation Toolkit for Microsoft Office User Guide

LabVIEW Report Generation Toolkit for Microsoft Office User Guide LabVIEW Report Generation Toolkit for Microsoft Office User Guide Version 1.1 Contents The LabVIEW Report Generation Toolkit for Microsoft Office provides tools you can use to create and edit reports in

More information

EXCEL TIPS AND TRICKS. Sherry Marek Co-Founder of Datavision Technologies

EXCEL TIPS AND TRICKS. Sherry Marek Co-Founder of Datavision Technologies EXCEL TIPS AND TRICKS Sherry Marek Co-Founder of Datavision Technologies AGENDA Excel Survey Why Excel is more than just Numbers Excel 2010/2013 Features General Timesaving features Pivot Table features

More information

Add an Audit Trail to your Access Database

Add an Audit Trail to your Access Database Add an to your Access Database Published: 22 April 2013 Author: Martin Green Screenshots: Access 2010, Windows 7 For Access Versions: 2003, 2007, 2010 About This Tutorial My Access tutorials are designed

More information

CERTIFIED MULESOFT DEVELOPER EXAM. Preparation Guide

CERTIFIED MULESOFT DEVELOPER EXAM. Preparation Guide CERTIFIED MULESOFT DEVELOPER EXAM Preparation Guide v. November, 2014 2 TABLE OF CONTENTS Table of Contents... 3 Preparation Guide Overview... 5 Guide Purpose... 5 General Preparation Recommendations...

More information

ICAEW IT FACULTY TWENTY PRINCIPLES FOR GOOD SPREADSHEET PRACTICE

ICAEW IT FACULTY TWENTY PRINCIPLES FOR GOOD SPREADSHEET PRACTICE ICAEW IT FACULTY TWENTY PRINCIPLES FOR GOOD SPREADSHEET PRACTICE INTRODUCTION Many spreadsheets evolve over time without well-structured design or integrity checks, and are poorly documented. Making a

More information

Efficient Data Structures for Decision Diagrams

Efficient Data Structures for Decision Diagrams Artificial Intelligence Laboratory Efficient Data Structures for Decision Diagrams Master Thesis Nacereddine Ouaret Professor: Supervisors: Boi Faltings Thomas Léauté Radoslaw Szymanek Contents Introduction...

More information

Abstract. Introduction. System Requirement. GUI Design. Paper AD17-2011

Abstract. Introduction. System Requirement. GUI Design. Paper AD17-2011 Paper AD17-2011 Application for Survival Analysis through Microsoft Access GUI Zhong Yan, i3, Indianapolis, IN Jie Li, i3, Austin, Texas Jiazheng (Steven) He, i3, San Francisco, California Abstract This

More information

Many applications consist of one or more classes, each containing one or more methods. If you become part of a development team in industry, you may

Many applications consist of one or more classes, each containing one or more methods. If you become part of a development team in industry, you may Chapter 1 Many applications consist of one or more classes, each containing one or more methods. If you become part of a development team in industry, you may work on applications that contain hundreds,

More information

Final Exam Review: VBA

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

More information

Siemens Applied Automation Page 1 11/26/03 9:57 PM. Maxum ODBC 3.11

Siemens Applied Automation Page 1 11/26/03 9:57 PM. Maxum ODBC 3.11 Siemens Applied Automation Page 1 Maxum ODBC 3.11 Table of Contents Installing the Polyhedra ODBC driver... 2 Using ODBC with the Maxum Database... 2 Microsoft Access 2000 Example... 2 Access Example (Prior

More information

Tips and Tricks SAGE ACCPAC INTELLIGENCE

Tips and Tricks SAGE ACCPAC INTELLIGENCE Tips and Tricks SAGE ACCPAC INTELLIGENCE 1 Table of Contents Auto e-mailing reports... 4 Automatically Running Macros... 7 Creating new Macros from Excel... 8 Compact Metadata Functionality... 9 Copying,

More information

Microsoft Office 2010: Access 2010, Excel 2010, Lync 2010 learning assets

Microsoft Office 2010: Access 2010, Excel 2010, Lync 2010 learning assets Microsoft Office 2010: Access 2010, Excel 2010, Lync 2010 learning assets Simply type the id# in the search mechanism of ACS Skills Online to access the learning assets outlined below. Titles Microsoft

More information

language 1 (source) compiler language 2 (target) Figure 1: Compiling a program

language 1 (source) compiler language 2 (target) Figure 1: Compiling a program CS 2112 Lecture 27 Interpreters, compilers, and the Java Virtual Machine 1 May 2012 Lecturer: Andrew Myers 1 Interpreters vs. compilers There are two strategies for obtaining runnable code from a program

More information

VHDL Test Bench Tutorial

VHDL Test Bench Tutorial University of Pennsylvania Department of Electrical and Systems Engineering ESE171 - Digital Design Laboratory VHDL Test Bench Tutorial Purpose The goal of this tutorial is to demonstrate how to automate

More information

Fractions and Linear Equations

Fractions and Linear Equations Fractions and Linear Equations Fraction Operations While you can perform operations on fractions using the calculator, for this worksheet you must perform the operations by hand. You must show all steps

More information

Creating Applications using Excel Macros/Visual Basic for Applications (VBA)

Creating Applications using Excel Macros/Visual Basic for Applications (VBA) Creating Applications using Excel Macros/Visual Basic for Applications (VBA) A macro is a sequence of instructions that tells Microsoft Excel what to do. These macros allow you to automate everyday tasks

More information

Basic Unix/Linux 1. Software Testing Interview Prep

Basic Unix/Linux 1. Software Testing Interview Prep Basic Unix/Linux 1 Programming Fundamentals and Concepts 2 1. What is the difference between web application and client server application? Client server application is designed typically to work in a

More information

Fig. 1 Visit the Add-Ins dialog to view and load available Add-Ins.

Fig. 1 Visit the Add-Ins dialog to view and load available Add-Ins. Building an Excel Add-In About Add-Ins An Excel Add-In is a file (usually with an.xla or.xll extension) that Excel can load when it starts up. The file contains code (VBA in the case of an.xla Add-In)

More information

Introduction to MIPS Assembly Programming

Introduction to MIPS Assembly Programming 1 / 26 Introduction to MIPS Assembly Programming January 23 25, 2013 2 / 26 Outline Overview of assembly programming MARS tutorial MIPS assembly syntax Role of pseudocode Some simple instructions Integer

More information

Excel Formatting: Best Practices in Financial Models

Excel Formatting: Best Practices in Financial Models Excel Formatting: Best Practices in Financial Models Properly formatting your Excel models is important because it makes it easier for others to read and understand your analysis and for you to read and

More information

Performing Simple Calculations Using the Status Bar

Performing Simple Calculations Using the Status Bar Excel Formulas Performing Simple Calculations Using the Status Bar If you need to see a simple calculation, such as a total, but do not need it to be a part of your spreadsheet, all you need is your Status

More information

Introduction. Syntax Statements. Colon : Line Continuation _ Conditions. If Then Else End If 1. block form syntax 2. One-Line syntax. Do...

Introduction. Syntax Statements. Colon : Line Continuation _ Conditions. If Then Else End If 1. block form syntax 2. One-Line syntax. Do... 3 Syntax Introduction Syntax Statements Colon : Line Continuation _ Conditions If Then Else End If 1. block form syntax 2. One-Line syntax Select Case Case Case Else End Select Do...Loop For...Next While...Wend

More information

Data Integrator. Samples. Handbook. Pervasive Software, Inc. 12365-B Riata Trace Parkway Austin, Texas 78727 USA

Data Integrator. Samples. Handbook. Pervasive Software, Inc. 12365-B Riata Trace Parkway Austin, Texas 78727 USA Data Integrator Samples Handbook Pervasive Software, Inc. 12365-B Riata Trace Parkway Austin, Texas 78727 USA Telephone: 888.296.5969 or 512.231.6000 Fax: 512.231.6010 Email: info@pervasiveintegration.com

More information

Introduction to Microsoft Access 2003

Introduction to Microsoft Access 2003 Introduction to Microsoft Access 2003 Zhi Liu School of Information Fall/2006 Introduction and Objectives Microsoft Access 2003 is a powerful, yet easy to learn, relational database application for Microsoft

More information

SAP CCMS Monitors Microsoft Windows Eventlog

SAP CCMS Monitors Microsoft Windows Eventlog MSCTSC Collaboration Brief November 2004 SAP CCMS Monitors Microsoft Windows Eventlog Christian Klink Member of CTSC Focus Group SAP Technology Consultant SAP Technology Consulting II SAP Deutschland AG

More information

Training Needs Analysis

Training Needs Analysis Training Needs Analysis Microsoft Office 2007 Access 2007 Course Code: Name: Chapter 1: Access 2007 Orientation I understand how Access works and what it can be used for I know how to start Microsoft Access

More information

ER/Studio 8.0 New Features Guide

ER/Studio 8.0 New Features Guide ER/Studio 8.0 New Features Guide Copyright 1994-2008 Embarcadero Technologies, Inc. Embarcadero Technologies, Inc. 100 California Street, 12th Floor San Francisco, CA 94111 U.S.A. All rights reserved.

More information

Creating Datalogging Applications in Microsoft Excel

Creating Datalogging Applications in Microsoft Excel Creating Datalogging Applications in Microsoft Excel Application Note 1557 Table of contents Introduction 2 Steps for creating a scanning program 2 Using Excel for datalogging 4 Running the application

More information

Exercise 1: Python Language Basics

Exercise 1: Python Language Basics Exercise 1: Python Language Basics In this exercise we will cover the basic principles of the Python language. All languages have a standard set of functionality including the ability to comment code,

More information

Symbol Tables. Introduction

Symbol Tables. Introduction Symbol Tables Introduction A compiler needs to collect and use information about the names appearing in the source program. This information is entered into a data structure called a symbol table. The

More information

Tuning Subwoofers - Calibrating Subwoofers

Tuning Subwoofers - Calibrating Subwoofers Tuning Subwoofers - Calibrating Subwoofers WHY The purpose of a subwoofer is to fill in the bottom octaves below the capabilities of the mains speakers. There are many reasons to use a subwoofer to do

More information

TABLE OF CONTENTS...2 INTRODUCTION...3 APPLETS AND APPLICATIONS...3 JAVABEANS...4 EXCEPTION HANDLING...5 JAVA DATABASE CONNECTIVITY (JDBC)...

TABLE OF CONTENTS...2 INTRODUCTION...3 APPLETS AND APPLICATIONS...3 JAVABEANS...4 EXCEPTION HANDLING...5 JAVA DATABASE CONNECTIVITY (JDBC)... Advanced Features Trenton Computer Festival May 1 sstt & 2 n d,, 2004 Michael P.. Redlich Senior Research Technician ExxonMobil Research & Engineering michael..p..redlich@exxonmobil..com Table of Contents

More information

Talend Component: tjasperreportexec

Talend Component: tjasperreportexec Talend Component: tjasperreportexec Purpose This component creates (compile + fill + export) reports based on Jasper Report designs (jrxml files). Making reports in the ETL system provides multiple advantages:

More information

Start Oracle Insurance Policy Administration. Activity Processing. Version 9.2.0.0.0

Start Oracle Insurance Policy Administration. Activity Processing. Version 9.2.0.0.0 Start Oracle Insurance Policy Administration Activity Processing Version 9.2.0.0.0 Part Number: E16287_01 March 2010 Copyright 2009, Oracle and/or its affiliates. All rights reserved. This software and

More information

CMSC 202H. ArrayList, Multidimensional Arrays

CMSC 202H. ArrayList, Multidimensional Arrays CMSC 202H ArrayList, Multidimensional Arrays What s an Array List ArrayList is a class in the standard Java libraries that can hold any type of object an object that can grow and shrink while your program

More information

Using SAS DDE to Control Excel

Using SAS DDE to Control Excel Using SAS DDE to Control Excel George Zhu Alberta Health, Government of Alberta Edmonton SAS User Group Meeting April 15, 2015 1 DDE: Dynamic Data Exchange 2 Examples and Demonstration Demo 1: Import password

More information

Oct: 50 8 = 6 (r = 2) 6 8 = 0 (r = 6) Writing the remainders in reverse order we get: (50) 10 = (62) 8

Oct: 50 8 = 6 (r = 2) 6 8 = 0 (r = 6) Writing the remainders in reverse order we get: (50) 10 = (62) 8 ECE Department Summer LECTURE #5: Number Systems EEL : Digital Logic and Computer Systems Based on lecture notes by Dr. Eric M. Schwartz Decimal Number System: -Our standard number system is base, also

More information

Excel & Visual Basic for Applications (VBA)

Excel & Visual Basic for Applications (VBA) Excel & Visual Basic for Applications (VBA) user interfaces o on-sheet buttons o toolbar buttons and custom toolbars o custom menus o InputBox and MsgBox functions o userforms 1 On-Sheet Buttons 1) use

More information

Using GABRIEL Excel to XML Templates

Using GABRIEL Excel to XML Templates Using GABRIEL Excel to XML Templates Contents What are the templates for?...1 What do I need to use them?...2 How do I create XML data and load it into GABRIEL?...2 How can I enter data into the templates?...2

More information