Accept all the default choices in the Wizard's pages.

Size: px
Start display at page:

Download "Accept all the default choices in the Wizard's pages."

Transcription

1 XLL+ Overview XLL+ is a C++ add-in which assists users in creating Excel add-in components. Two key components assist developers in creating Excel add-ins more quickly and requiring less debugging: AppWizard creates complete Visual Studio projects, ready to compile and run XLL+ Function Wizard helps you write and maintain Excel add-in functions, and generates most of the code for you Getting Started 1. Start Microsoft Visual C Use the XLL+ AppWizard to create a new project (Click File -> New). Choose the XLL+ AppWizard 4, and type in a Project Name. Accept all the default choices in the Wizard's pages.

2 3. Use the New XLL+ Function ( ) tool to create a new add-in function. Fill in the function's name and description, and press OK. 4. In the XLL+ Function Wizard, add the names types and descriptions of your function's arguments, and press OK.

3 5. In DevStudio, add your own code to the skeleton generated by the Wizard, then build and test your project. For example, you might add the line of code shown below: extern "C" declspec( dllexport ) LPXLOPER EDateDiff(double StartDate, double EndDate, const char* Country) CXlOper xloresult; //XLP_SRC // TODO - Set the value of xloresult xloresult = 99.9; return xloresult.ret(); Writing an XLL+ Function The next step is to add an Excel Add-in function, using the XLL+ Function Wizard. In this example, we're going to write a function to return the cumulative normal (Gaussian) distribution. Note: Readers familiar with Excel may ask why we are writing a cumulative normal distribution function when Excel already contains the NORMSDIST() function. There are two reasons: 1. NORMSDIST() is inaccurate at extreme values, and the inverse function NORMSINV() fails beyond 5 standard deviations. 2. It makes a good example function. It is good practise to put all important business functions in separate functions that are not Excel-dependent. If you do this, you will be able to reuse the code unchanged in other environments. That is what we will do here. The code for 'stand-alone' implementations of the cumulative normal distribution and its inverse is shown below. Code for stand-alone functions The Normal() and CumNormal() functions cannot fail, so they simply return their result. InverseCumNormal() can fail if the input is out of range, so it returns 1 for success and 0 for failure. The inverted value is passed back via the pointer result. #include <math.h> // Normal distribution function double Normal(double x) #define SQRT2PI return exp(-x * x / 2.0) / SQRT2PI; // Cumulative normal distribution function double CumNormal(double x)

4 #define gamma #define a #define a #define a #define a #define a double k; if (x < 0.0 ) return CumNormal(-x); else k = 1.0 / (1.0 + gamma * x); return Normal(x) * ((((a5 * k + a4) * k + a3) * k + a2) * k + a1) * k; // Inverse cumulative normal function // Returns 1 for success, 0 for failure int InverseCumNormal(double u, double* result) int i; double Y, num, den; static double p[] = , -1.0, , , ; static double q[] = , , , , ; if (u <= 0.0 u >= 1.0) return 0; if (fabs(u - 0.5) < 10e-8) *result = 0.0; return 1;

5 if (u < 0.5) InverseCumNormal(1.0 - u, result); *result *= -1.0; return 1; Y = sqrt(-log((1.0 - u)*(1.0 - u))); num = p[4]; den = q[4]; for (i=3; i>=0; i--) num = num*y + p[i]; den = den * Y + q[i]; *result = Y + num / den; return 1; Adding the stand-alone functions In DevStudio, open the file Tutorial1.cpp, and add the code above at the end of the file. Tip: It is a very bad idea to type in all the code shown above. You can copy it from here and paste into your source file, or you can find all the code for this tutorial in the Samples/Tutorial1 sub-directory. All the important code is now written. All we need to do is to generate the Excel add-in function, and plug it into a stand-alone function. The next step is to use the XLL+ Function Wizard to generate the code for the Excel add-in function NORMSDIST2(). Select a source file Make sure that Developer Studio is open and that Tutorial1 is the active project. Open or activate the file Tutorial1.cpp. Invoke the Function Wizard In Developer Studio, using the XLL+ Toolbar, click on the New Function tool. This will start the Function Wizard. Enter function details

6 In the Add New Function dialog, fill in the name, category and description of the function as follows: Name: NORMSDIST2 Category: Statistical Description: Returns the standard normal cumulative distribution function (has a mean of zero and a standard deviation of one) What do these fields mean? Name The name you enter here will be used as the name of the function visible in Excel and also as the name of the C++ function that implements the add-in function. Category When the function appears in Excel's Formula Wizard, it will appear under the category you enter here. Description This description will appear in Excel's Formula Wizard. It will also be inserted into your C++ code as part of the function's header comment. After you click on OK, the main Function Wizard dialog will appear, so that you can enter the other details of the new add-in function. The Function Wizard Once we enter the function name, category and description, the main Function Wizard dialog will appear, as below. You can see that we've created our new function, but it has no arguments as yet, and still has the wrong return type. Set return type NORMSDIST2 is a very simple function, that takes one numeric argument and returns a numeric result. To reflect this, select the Returns combo-box and set its value to Double (i.e. double-precision floating-point number), as shown below. Add an argument The next thing we need to do is add an argument. In the first column of the empty row in the arguments grid, type the argument name Z, as shown below. As you move off the cell, the rest of the row will be populated with the default values for the new argument, Z.

7 Set argument description Fill in the description column, as follows: Z is the value for which you want the distribution The columns describing the argument should now contain the following: Name: Z Type: Dimensions: Double Scalar Description: Z is the value for which you want the distribution We have now finished specifying our add-in function. Click on the OK button to dismiss the Wizard and update the source code. Code generated by the wizard As you return to DevStudio, you will see that the wizard will has inserted the following source code at the end of your C++ file. // Function: NORMSDIST2 // Purpose: Returns the standard normal cumulative distribution function (has a mean of zero and a standard deviation of one) //XLP_SRC(NORMSDIST2) // NOTE - the FunctionWizard will add and remove mapping code here. // DO NOT EDIT what you see in these blocks of generated code! IMPLEMENT_XLLFN2(NORMSDIST2, "BB", "NORMSDIST2", "Z", "Statistica" "l", "Returns the standard normal cumulative distribution" " function (has a mean of zero and a standard deviation of" " one)", "Z is the value for which you want the distribution", "\0", 1) extern "C" declspec( dllexport ) double NORMSDIST2(double Z) //XLP_SRC // TODO - Calculate and return the result return 0; In the following sections, we'll examine all this code. Delimiters The first thing to notice are the comments that delimit the generated code: //XLP_SRC(NORMSDIST2) // NOTE - the FunctionWizard will add and remove mapping code here.

8 // DO NOT EDIT what you see in these blocks of generated code!... //XLP_SRC The Function Wizard "owns" all the code between the delimiters. Everything between these comments is liable to be written over if you use the Function Wizard again to change the function in any way. Be very careful to make your changes outside these delimiters. Macro The next section of interest is the IMPLEMENT_XLLFN2(...) macro: IMPLEMENT_XLLFN2(NORMSDIST2, "BB", "NORMSDIST2", "Z", "Statistica" "l", "Returns the standard normal cumulative distribution" " function (has a mean of zero and a standard deviation of" " one)", "Z is the value for which you want the distribution", "\0", 1) This macro contains all the information you typed into the Function Wizard. At run-time, the XLL+ runtime library will pass all this data to Excel, in order to register your function and to tell Excel about its arguments. (Again, be careful not to alter it yourself.) Declaration The next line exports the function and ensures that the exported name of the function is not mangled. extern "C" declspec( dllexport ) The declaration of the function follows. We have a complete skeleton of the function; now we need to add some useful code. Adding some useful code Add code to the function to call our stand-alone function, as shown below: extern "C" declspec( dllexport ) double NORMSDIST2(double Z) //XLP_SRC return CumNormal(Z); That's it. We're now ready to build and test our add-in function. Results This topic shows you how to return a 1-dimensional array to Excel. The example is a very simple function for sorting numeric arrays in ascending order. Use the Function Wizard to create a new function with these properties:

9 Name: Category: SORTVECTOR Lookup & Reference Description: Sort a vector of numbers in ascending order Add a single argument with the following properties: Name: Vector Type: Dimensions: Double Vector Description: Unsorted vector of numbers Press OK to return to DevStudio. Add code so that your add-in function looks like this: // Function: SORTVECTOR // Purpose: Sort a vector of numbers in ascending order //XLP_SRC(SORTVECTOR) // NOTE - the FunctionWizard will add and remove mapping code here. // DO NOT EDIT what you see in these blocks of generated code! IMPLEMENT_XLLFN2(SORTVECTOR, "RP", "SORTVECTOR", "Vector", "Lookup & Reference", "Sort a vector of numbers in ascending" " order", "Unsorted vector of numbers", "B()Vector Unsorted" " vector of numbers\0", 1) extern "C" declspec( dllexport ) LPXLOPER SORTVECTOR(const COper* Vector) CXlOper xloresult; BOOL bok = TRUE; std::vector<double> vecvector; bok = bok && Vector->ReadVector(vecVector, "Vector", xloresult); if (!bok) return xloresult.ret(); //XLP_SRC // Use STL algorithm to sort input std::sort(vecvector.begin(), vecvector.end()); // Copy the sorted vector to xloresult xloresult = vecvector; return xloresult.ret(); Yet another overload of the CXlOper assignment operator is used to copy the STL vector into xloresult: xloresult = vecvector; The operator creates an array of values within xloresult and populates it with the values in vecvector. This is one of the most pleasingly simple add-in functions in this tutorial. It is not necessarily very useful - a better implementation would sort a 2-dimensional array by a given column or columns, in ascending and descending order - but it is very short, and does a surprising amount of work in its two lines of hand-written code.

10 To make use of the SORTVECTOR function, you need to know how to enter array formulae in Excel. If you are already familiar with Excel array formulae, please skip to the next section. To enter an array formula in Excel, follow these steps: 1. Select the cells which will jointly contain the array formula. 2. Type in the cells' formula. 3. Press Ctrl+Shift+Enter - i.e. hit the Enter key, while holding down the Control and Shift keys. You can recognize an array formula, because it is shown in Excel surrounded by curly braces... Note: You do not have to type in the curly braces. Excel adds these for you, if you use Ctrl+Shift+Enter to signify an array formula. The example below shows the SORTVECTOR function is use in an array formula. Returning a matrix to Excel is very similar to returning a vector. Add the following stand-alone matrix function to Tutorial1.cpp. Note: This is a very silly add-in function. Transformations of this kind are far easier to do in Excel itself, especially if you use a mixture of relative and absolute addresses. But it makes a reasonably good example function. // Multiplication of two vectors to produce a matrix // aadz should be an array of cx pointers to columns void MatrixMultiply(int cx, double* adx, int cy, double* ady, double** aadz) int i, j; for (i = 0; i < cx; i++) for (j = 0; j < cy; j++) aadz[i][j] = adx[i] * ady[j]; Note that argument aadz is an array of pointers to columns. Use the Function Wizard to create a new function MATRIXMULT: Modify the generated code so that it looks like this: extern "C" declspec( dllexport ) LPXLOPER MATRIXMULT(const COper* X, const COper* Y) CXlOper xloresult;

11 BOOL bok = TRUE; std::vector<double> vecx; bok = bok && X->ReadVector(vecX, "X", xloresult); std::vector<double> vecy; bok = bok && Y->ReadVector(vecY, "Y", xloresult); if (!bok) return xloresult.ret(); //XLP_SRC // Allocate a matrix with initial size rows = vecy.xsize() and cols = vecx.size() xlp::matrix<double> matresult(vecy.size(), vecx.size()); // Get an array of column pointers from the matrix std::vector<double*> vecresult; matresult.get_col_ptrs(vecresult); // Pass the input and output arrays to the stand-alone function MatrixMultiply(vecX.size(), vecx.begin(), vecy.size(), vecy.begin(), vecresult.begin()); // Populate xloresult with the resulting matrix xloresult = matresult; return xloresult.ret(); Here we've made use of the matrix class to manage the output array. The matrix constructor allocates an appropriate number of rows and columns, which are initially filled with zeroes. We also use the matrix::get_col_ptrs() method to populate an array of column pointers, as required by MatrixMultiply(). Populating xloresult with the result of MatrixMultiply() is very simple: we use another CXlOper overloaded assignment operator to allocate the output data and to copy in the contents of matresult. Sometimes your results will not be in ready-made vector or matrix form, and you'll need to use a different CXlOper method to populate xloresult. CXlOper::FromDoubleArray The simplest method to use is CXlOper::FromDoubleArray(), to populate the xloresult, using an array of values or of pointers to rows/columns of values. The various different versions of this method are listed below: FromDoubleArray(double *pd, USHORT cpoints) Create a one-column array and populate it with the supplied data points. FromDoubleArray(double *pd, USHORT crows, USHORT ccols, BOOL bbyrows)

12 Create a two-dimensional array and populate it with the supplied continuous data array. The bbyrows argument will decide whether rows (TRUE) or columns (FALSE) are kept together. FromDoubleArray(double **apd, USHORT crows, USHORT ccols, BOOL bbyrows) Create a two-dimensional array and populate it with the supplied data, which consists of an array of column or row pointers, depending on the value of bbyrows. CXlOper::AllocArray A more complex way to populate an array result is by using CXlOper::AllocArray() to create the array, and then CXlOper::Cell() to populate each cell. While this method involves more programming, it gives you full control over the output, and allows you to have mixed data types in the array. See the CXlOper::AllocArray() example for an example of this technique.

CS201 Latest Solved MCQs

CS201 Latest Solved MCQs Quiz Start Time: 09:34 PM Time Left 82 sec(s) Question # 1 of 10 ( Start time: 09:34:54 PM ) Total Marks: 1 While developing a program; should we think about the user interface? //handouts main reusability

More information

CS1622. Semantic Analysis. The Compiler So Far. Lecture 15 Semantic Analysis. How to build symbol tables How to use them to find

CS1622. Semantic Analysis. The Compiler So Far. Lecture 15 Semantic Analysis. How to build symbol tables How to use them to find CS1622 Lecture 15 Semantic Analysis CS 1622 Lecture 15 1 Semantic Analysis How to build symbol tables How to use them to find multiply-declared and undeclared variables. How to perform type checking CS

More information

Quiz Start Time: 09:34 PM Time Left 82 sec(s)

Quiz Start Time: 09:34 PM Time Left 82 sec(s) Quiz Start Time: 09:34 PM Time Left 82 sec(s) Question # 1 of 10 ( Start time: 09:34:54 PM ) Total Marks: 1 While developing a program; should we think about the user interface? //handouts main reusability

More information

XLW PLUS : A SYSTEM FOR BUILDING XLLS WITHOUT PAIN

XLW PLUS : A SYSTEM FOR BUILDING XLLS WITHOUT PAIN XLW PLUS : A SYSTEM FOR BUILDING XLLS WITHOUT PAIN MARK S. JOSHI 1. Introduction Much numerical coding in quantitative finance is carried out in C++. Much numerical work in finance is performed in EXCEL.

More information

Pace University. Fundamental Concepts of CS121 1

Pace University. Fundamental Concepts of CS121 1 Pace University Fundamental Concepts of CS121 1 Dr. Lixin Tao http://csis.pace.edu/~lixin Computer Science Department Pace University October 12, 2005 This document complements my tutorial Introduction

More information

C introduction: part 1

C introduction: part 1 What is C? C is a compiled language that gives the programmer maximum control and efficiency 1. 1 https://computer.howstuffworks.com/c1.htm 2 / 26 3 / 26 Outline Basic file structure Main function Compilation

More information

LIBRE OFFICE CALC What is Calc? Spreadsheets, sheets, and cells spreadsheets Spreadsheets Cells

LIBRE OFFICE CALC What is Calc? Spreadsheets, sheets, and cells spreadsheets Spreadsheets Cells 1 LIBRE OFFICE CALC What is Calc? Calc is the spreadsheet component of LibreOffice. You can enter data (usually numerical) in a spreadsheet and then manipulate this data to produce certain results. Alternatively,

More information

Professor Terje Haukaas University of British Columbia, Vancouver C++ Programming

Professor Terje Haukaas University of British Columbia, Vancouver  C++ Programming C++ Programming C++ code is essentially a collection of statements terminated by a semicolon, such as (spaces not needed): a = b + c; Most C++ code is organized into header files and cpp files, i.e., C++

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

Use mail merge to create and print letters and other documents

Use mail merge to create and print letters and other documents Use mail merge to create and print letters and other documents Contents Use mail merge to create and print letters and other documents... 1 Set up the main document... 1 Connect the document to a data

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

Advanced Excel Skills

Advanced Excel Skills Advanced Excel Skills Note : This tutorial is based upon MSExcel 2000. If you are using MSExcel 2002, there may be some operations which look slightly different (e.g. pivot tables), but the same principles

More information

Topic 6: A Quick Intro To C

Topic 6: A Quick Intro To C Topic 6: A Quick Intro To C Assumption: All of you know Java. Much of C syntax is the same. Also: Many of you have used C or C++. Goal for this topic: you can write & run a simple C program basic functions

More information

Introduction to Programming using C++

Introduction to Programming using C++ Introduction to Programming using C++ Lecture One: Getting Started Carl Gwilliam gwilliam@hep.ph.liv.ac.uk http://hep.ph.liv.ac.uk/~gwilliam/cppcourse Course Prerequisites What you should already know

More information

calling a function - function-name(argument list); y = square ( z ); include parentheses even if parameter list is empty!

calling a function - function-name(argument list); y = square ( z ); include parentheses even if parameter list is empty! Chapter 6 - Functions return type void or a valid data type ( int, double, char, etc) name parameter list void or a list of parameters separated by commas body return keyword required if function returns

More information

In either case, remember to delete each array that you allocate.

In either case, remember to delete each array that you allocate. CS 103 Path-so-logical 1 Introduction In this programming assignment you will write a program to read a given maze (provided as an ASCII text file) and find the shortest path from start to finish. 2 Techniques

More information

Faculty of Engineering Computer Engineering Department Islamic University of Gaza C++ Programming Language Lab # 6 Functions

Faculty of Engineering Computer Engineering Department Islamic University of Gaza C++ Programming Language Lab # 6 Functions Faculty of Engineering Computer Engineering Department Islamic University of Gaza 2013 C++ Programming Language Lab # 6 Functions C++ Programming Language Lab # 6 Functions Objective: To be familiar with

More information

Introduction to CS databases and statistics in Excel Jacek Wiślicki, Laurent Babout,

Introduction to CS databases and statistics in Excel Jacek Wiślicki, Laurent Babout, One of the applications of MS Excel is data processing and statistical analysis. The following exercises will demonstrate some of these functions. The base files for the exercises is included in http://lbabout.iis.p.lodz.pl/teaching_and_student_projects_files/files/us/lab_04b.zip.

More information

Chapter 1. Section 1.4 Subprograms or functions. CS 50 - Hathairat Rattanasook

Chapter 1. Section 1.4 Subprograms or functions. CS 50 - Hathairat Rattanasook Chapter 1 Section 1.4 Subprograms or functions 0 Functions Functions are essential in writing structured and well-organized code. Functions help for code to be reused. Functions help to reduce errors and

More information

Introduction to C/C++ Programming

Introduction to C/C++ Programming Chapter 1 Introduction to C/C++ Programming This book is about learning numerical programming skill and the software development process. Therefore, it requires a lot of hands-on programming exercises.

More information

COIMBATORE EDUCATIONAL DISTRICT

COIMBATORE EDUCATIONAL DISTRICT COIMBATORE EDUCATIONAL DISTRICT REVISION EXAMINATION JANUARY 2015 STD-12 COMPUTER SCIENCE ANSEWR KEY PART-I Choose the Correct Answer QNo Answer QNo Answer 1 B Absolute Cell Addressing 39 C Void 2 D

More information

Introduction to Excel 2013

Introduction to Excel 2013 Introduction to Excel 2013 Copyright 2014, Software Application Training, West Chester University. A member of the Pennsylvania State Systems of Higher Education. No portion of this document may be reproduced

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

Using Microsoft Excel

Using Microsoft Excel Using Microsoft Excel Introduction This handout briefly outlines most of the basic uses and functions of Excel that we will be using in this course. Although Excel may be used for performing statistical

More information

CAAM 420 Daily Note. Scriber: Qijia Jiang. Date: Oct.16. Project 3 Due Wed 23.Oct. Two parts: debug code and library exercise.

CAAM 420 Daily Note. Scriber: Qijia Jiang. Date: Oct.16. Project 3 Due Wed 23.Oct. Two parts: debug code and library exercise. CAAM 420 Daily Note Scriber: Qijia Jiang Date: Oct.16 1 Announcement Project 3 Due Wed 23.Oct. Two parts: debug code and library exercise. 2 Make Convention Make syntax for library directories and library

More information

Math 227 EXCEL / MEGASTAT Guide

Math 227 EXCEL / MEGASTAT Guide Math 227 EXCEL / MEGASTAT Guide Introduction Introduction: Ch2: Frequency Distributions and Graphs Construct Frequency Distributions and various types of graphs: Histograms, Polygons, Pie Charts, Stem-and-Leaf

More information

CS201- Introduction to Programming Latest Solved Mcqs from Midterm Papers May 07,2011. MIDTERM EXAMINATION Spring 2010

CS201- Introduction to Programming Latest Solved Mcqs from Midterm Papers May 07,2011. MIDTERM EXAMINATION Spring 2010 CS201- Introduction to Programming Latest Solved Mcqs from Midterm Papers May 07,2011 Lectures 1-22 Moaaz Siddiq Asad Ali Latest Mcqs MIDTERM EXAMINATION Spring 2010 Question No: 1 ( Marks: 1 ) - Please

More information

Excel Formulas & Functions I CS101

Excel Formulas & Functions I CS101 Excel Formulas & Functions I CS101 Topics Covered Use statistical functions Use cell references Use AutoFill Write formulas Use the RANK.EQ function Calculation in Excel Click the cell where you want to

More information

During the course of writing the Matrix class we will cover some interesting C++ topics. Specically: constructors and destructors, operator

During the course of writing the Matrix class we will cover some interesting C++ topics. Specically: constructors and destructors, operator A Matrix Class During the course of writing the Matrix class we will cover some interesting C++ topics. Specically: constructors and destructors, operator overloading, the rule of three, returning references,

More information

Overview of C++ Support in TI Compiler Tools July 2008

Overview of C++ Support in TI Compiler Tools July 2008 Overview of C++ Support in TI Compiler Tools July 2008 1 Table of Contents 1 Table of Contents... 1 2 Introduction... 1 3 Support for the Language... 1 4 Embedded C++... 1 5 Some Comments on Efficiency...

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

Formulas, LookUp Tables and PivotTables Prepared for Aero Controlex

Formulas, LookUp Tables and PivotTables Prepared for Aero Controlex Basic Topics: Formulas, LookUp Tables and PivotTables Prepared for Aero Controlex Review ribbon terminology such as tabs, groups and commands Navigate a worksheet, workbook, and multiple workbooks Prepare

More information

BLM2031 Structured Programming. Zeyneb KURT

BLM2031 Structured Programming. Zeyneb KURT BLM2031 Structured Programming Zeyneb KURT 1 Contact Contact info office : D-219 e-mail zeynebkurt@gmail.com, zeyneb@ce.yildiz.edu.tr When to contact e-mail first, take an appointment What to expect help

More information

COURSE CONTENT Excel with VBA Training

COURSE CONTENT Excel with VBA Training COURSE CONTENT Excel with VBA Training MS Excel - Advance 1. Excel Quick Overview Use of Excel, its boundaries & features 2. Data Formatting & Custom setting Number, Text, Date, Currency, Custom settings.

More information

1. NORM.INV function Returns the inverse of the normal cumulative distribution for the specified mean and standard deviation.

1. NORM.INV function Returns the inverse of the normal cumulative distribution for the specified mean and standard deviation. Excel Primer for Risk Management Course 1. NORM.INV function Returns the inverse of the normal cumulative distribution for the specified mean and standard deviation. 2. VLOOKUP The VLOOKUP function syntax

More information

static CS106L Spring 2009 Handout #21 May 12, 2009 Introduction

static CS106L Spring 2009 Handout #21 May 12, 2009 Introduction CS106L Spring 2009 Handout #21 May 12, 2009 static Introduction Most of the time, you'll design classes so that any two instances of that class are independent. That is, if you have two objects one and

More information

Topic 6: A Quick Intro To C. Reading. "goto Considered Harmful" History

Topic 6: A Quick Intro To C. Reading. goto Considered Harmful History Topic 6: A Quick Intro To C Reading Assumption: All of you know basic Java. Much of C syntax is the same. Also: Some of you have used C or C++. Goal for this topic: you can write & run a simple C program

More information

Common Misunderstandings from Exam 1 Material

Common Misunderstandings from Exam 1 Material Common Misunderstandings from Exam 1 Material Kyle Dewey Stack and Heap Allocation with Pointers char c = c ; char* p1 = malloc(sizeof(char)); char** p2 = &p1; Where is c allocated? Where is p1 itself

More information

A Fast Review of C Essentials Part I

A Fast Review of C Essentials Part I A Fast Review of C Essentials Part I Structural Programming by Z. Cihan TAYSI Outline Program development C Essentials Functions Variables & constants Names Formatting Comments Preprocessor Data types

More information

Assignment 1: grid. Due November 20, 11:59 PM Introduction

Assignment 1: grid. Due November 20, 11:59 PM Introduction CS106L Fall 2008 Handout #19 November 5, 2008 Assignment 1: grid Due November 20, 11:59 PM Introduction The STL container classes encompass a wide selection of associative and sequence containers. However,

More information

SUM - This says to add together cells F28 through F35. Notice that it will show your result is

SUM - This says to add together cells F28 through F35. Notice that it will show your result is COUNTA - The COUNTA function will examine a set of cells and tell you how many cells are not empty. In this example, Excel analyzed 19 cells and found that only 18 were not empty. COUNTBLANK - The COUNTBLANK

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

Introduction to Internet of Things Prof. Sudip Misra Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur

Introduction to Internet of Things Prof. Sudip Misra Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur Introduction to Internet of Things Prof. Sudip Misra Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur Lecture - 23 Introduction to Arduino- II Hi. Now, we will continue

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

Statistical Good Practice Guidelines. 1. Introduction. Contents. SSC home Using Excel for Statistics - Tips and Warnings

Statistical Good Practice Guidelines. 1. Introduction. Contents. SSC home Using Excel for Statistics - Tips and Warnings Statistical Good Practice Guidelines SSC home Using Excel for Statistics - Tips and Warnings On-line version 2 - March 2001 This is one in a series of guides for research and support staff involved in

More information

Short Notes of CS201

Short Notes of CS201 #includes: Short Notes of CS201 The #include directive instructs the preprocessor to read and include a file into a source code file. The file name is typically enclosed with < and > if the file is a system

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

A Tutorial for ECE 175

A Tutorial for ECE 175 Debugging in Microsoft Visual Studio 2010 A Tutorial for ECE 175 1. Introduction Debugging refers to the process of discovering defects (bugs) in software and correcting them. This process is invoked when

More information

C++ Programming. Arrays and Vectors. Chapter 6. Objectives. Chiou. This chapter introduces the important topic of data structures collections

C++ Programming. Arrays and Vectors. Chapter 6. Objectives. Chiou. This chapter introduces the important topic of data structures collections C++ Programming Chapter 6 Arrays and Vectors Yih-Peng Chiou Room 617, BL Building (02) 3366-3603 3603 ypchiou@cc.ee.ntu.edu.tw Photonic Modeling and Design Lab. Graduate Institute of Photonics and Optoelectronics

More information

Page. No. 1/15 CS201 Introduction to Programmming Solved Subjective Questions From spring 2010 Final Term Papers By vuzs Team

Page. No. 1/15 CS201 Introduction to Programmming Solved Subjective Questions From spring 2010 Final Term Papers By vuzs Team Page. No. 1/15 CS201 Introduction to Programmming Solved Subjective Questions From spring 2010 Final Term Papers By vuzs Team Question No: 1 ( Marks: 2 ) Write a declaration statement for an array of 10

More information

Technical Questions. Q 1) What are the key features in C programming language?

Technical Questions. Q 1) What are the key features in C programming language? Technical Questions Q 1) What are the key features in C programming language? Portability Platform independent language. Modularity Possibility to break down large programs into small modules. Flexibility

More information

Create your first workbook

Create your first workbook Create your first workbook You've been asked to enter data in Excel, but you've never worked with Excel. Where do you begin? Or perhaps you have worked in Excel a time or two, but you still wonder how

More information

Final exam. Final exam will be 12 problems, drop any 2. Cumulative up to and including week 14 (emphasis on weeks 9-14: classes & pointers)

Final exam. Final exam will be 12 problems, drop any 2. Cumulative up to and including week 14 (emphasis on weeks 9-14: classes & pointers) Review Final exam Final exam will be 12 problems, drop any 2 Cumulative up to and including week 14 (emphasis on weeks 9-14: classes & pointers) 2 hours exam time, so 12 min per problem (midterm 2 had

More information

CS201 - Introduction to Programming Glossary By

CS201 - Introduction to Programming Glossary By CS201 - Introduction to Programming Glossary By #include : The #include directive instructs the preprocessor to read and include a file into a source code file. The file name is typically enclosed with

More information

Makefiles Makefiles should begin with a comment section of the following form and with the following information filled in:

Makefiles Makefiles should begin with a comment section of the following form and with the following information filled in: CS 215 Fundamentals of Programming II C++ Programming Style Guideline Most of a programmer's efforts are aimed at the development of correct and efficient programs. But the readability of programs is also

More information

THE FORMULAS TAB, CELL REFERENCING,THE VIEW TAB & WORKBOOK SECURITY THE FORMULAS TAB, CELL REFERENCING, THE VIEW TAB & WORKBOOK SECURITY OBJECTIVES

THE FORMULAS TAB, CELL REFERENCING,THE VIEW TAB & WORKBOOK SECURITY THE FORMULAS TAB, CELL REFERENCING, THE VIEW TAB & WORKBOOK SECURITY OBJECTIVES THE FORMULAS TAB, CELL REFERENCING,THE VIEW TAB & WORKBOOK SECURITY Session 9 THE FORMULAS TAB, CELL REFERENCING, THE VIEW TAB & WORKBOOK SECURITY General Objectives OBJECTIVES Session 9 In this Session,

More information

Object Oriented Programming in C#

Object Oriented Programming in C# Introduction to Object Oriented Programming in C# Class and Object 1 You will be able to: Objectives 1. Write a simple class definition in C#. 2. Control access to the methods and data in a class. 3. Create

More information

Object-Oriented Programming for Scientific Computing

Object-Oriented Programming for Scientific Computing Object-Oriented Programming for Scientific Computing Smart Pointers and Constness Ole Klein Interdisciplinary Center for Scientific Computing Heidelberg University ole.klein@iwr.uni-heidelberg.de Summer

More information

with TestComplete 12 Desktop, Web, and Mobile Testing Tutorials

with TestComplete 12 Desktop, Web, and Mobile Testing Tutorials with TestComplete 12 Desktop, Web, and Mobile Testing Tutorials 2 About the Tutorial With TestComplete, you can test applications of three major types: desktop, web and mobile: Desktop applications - these

More information

ADVANCED INQUIRIES IN ALBEDO: PART 2 EXCEL DATA PROCESSING INSTRUCTIONS

ADVANCED INQUIRIES IN ALBEDO: PART 2 EXCEL DATA PROCESSING INSTRUCTIONS ADVANCED INQUIRIES IN ALBEDO: PART 2 EXCEL DATA PROCESSING INSTRUCTIONS Once you have downloaded a MODIS subset, there are a few steps you must take before you begin analyzing the data. Directions for

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

More loops Ch

More loops Ch More loops Ch 3.3-3.4 Announcements Quiz next week! -Covers up to (and including) HW1 (week 1-3) -Topics: cout/cin, types, scope, if/else, etc. Review: Loops We put a loop around code that we want to run

More information

OBJECTIVE QUESTIONS: Choose the correct alternative:

OBJECTIVE QUESTIONS: Choose the correct alternative: OBJECTIVE QUESTIONS: Choose the correct alternative: 1. Function is data type a) Primary b) user defined c) derived d) none 2. The declaration of function is called a) function prototype b) function call

More information

Chapter 1 Getting Started

Chapter 1 Getting Started Chapter 1 Getting Started The C# class Just like all object oriented programming languages, C# supports the concept of a class. A class is a little like a data structure in that it aggregates different

More information

Published on Online Documentation for Altium Products (https://www.altium.com/documentation)

Published on Online Documentation for Altium Products (https://www.altium.com/documentation) Published on Online Documentation for Altium Products (https://www.altium.com/documentation) Home > PCBLIB List A New Era for Documentation Modified by Susan Riege on Jan 24, 2018 Parent Page PCB Panels

More information

C PROGRAMMING LANGUAGE. POINTERS, ARRAYS, OPERATORS AND LOOP. CAAM 519, CHAPTER5

C PROGRAMMING LANGUAGE. POINTERS, ARRAYS, OPERATORS AND LOOP. CAAM 519, CHAPTER5 C PROGRAMMING LANGUAGE. POINTERS, ARRAYS, OPERATORS AND LOOP. CAAM 519, CHAPTER5 1. Pointers As Kernighan and Ritchie state, a pointer is a variable that contains the address of a variable. They have been

More information

Excel Tips and Tricks

Excel Tips and Tricks Excel Tips and Tricks References Excel Annoyances - Curtis Frye Excel Hacks - O Reilly http://www.exceltip.com (Joseph Rubin) http://exceltips.vitalnews.com/ (Allen Wyatt) Some Excel Basics as well as

More information

QUIZ. What is wrong with this code that uses default arguments?

QUIZ. What is wrong with this code that uses default arguments? QUIZ What is wrong with this code that uses default arguments? Solution The value of the default argument should be placed in either declaration or definition, not both! QUIZ What is wrong with this code

More information

Introduction to Programming in C Department of Computer Science and Engineering. Lecture No. #29 Arrays in C

Introduction to Programming in C Department of Computer Science and Engineering. Lecture No. #29 Arrays in C Introduction to Programming in C Department of Computer Science and Engineering Lecture No. #29 Arrays in C (Refer Slide Time: 00:08) This session will learn about arrays in C. Now, what is the word array

More information

VII. Data Management Essentials

VII. Data Management Essentials VII. Sort Excel recognizes a list or data set if the data in the list is contiguous, bordered by blank cells or an edge of the worksheet, and has labels that are differentiated in some way from the data.

More information

Excel Expert Microsoft Excel 2010

Excel Expert Microsoft Excel 2010 Excel Expert Microsoft Excel 2010 Formulas & Functions Table of Contents Excel 2010 Formulas & Functions... 2 o Formula Basics... 2 o Order of Operation... 2 Conditional Formatting... 2 Cell Styles...

More information

QUIZ on Ch.5. Why is it sometimes not a good idea to place the private part of the interface in a header file?

QUIZ on Ch.5. Why is it sometimes not a good idea to place the private part of the interface in a header file? QUIZ on Ch.5 Why is it sometimes not a good idea to place the private part of the interface in a header file? Example projects where we don t want the implementation visible to the client programmer: The

More information

Course contents. Overview: Goodbye, calculator. Lesson 1: Get started. Lesson 2: Use cell references. Lesson 3: Simplify formulas by using functions

Course contents. Overview: Goodbye, calculator. Lesson 1: Get started. Lesson 2: Use cell references. Lesson 3: Simplify formulas by using functions Course contents Overview: Goodbye, calculator Lesson 1: Get started Lesson 2: Use cell references Lesson 3: Simplify formulas by using functions Overview: Goodbye, calculator Excel is great for working

More information

MS Excel Advanced Level

MS Excel Advanced Level MS Excel Advanced Level Trainer : Etech Global Solution Contents Conditional Formatting... 1 Remove Duplicates... 4 Sorting... 5 Filtering... 6 Charts Column... 7 Charts Line... 10 Charts Bar... 10 Charts

More information

Lecture- 5. Introduction to Microsoft Excel

Lecture- 5. Introduction to Microsoft Excel Lecture- 5 Introduction to Microsoft Excel The Microsoft Excel Window Microsoft Excel is an electronic spreadsheet. You can use it to organize your data into rows and columns. You can also use it to perform

More information

Computer Science Department Carlos III University of Madrid Leganés (Spain) David Griol Barres

Computer Science Department Carlos III University of Madrid Leganés (Spain) David Griol Barres Computer Science Department Carlos III University of Madrid Leganés (Spain) David Griol Barres dgriol@inf.uc3m.es Introduction He am a driver might be syntactically correct but semantically wrong. Semantic

More information

A Crash Course in C. Steven Reeves

A Crash Course in C. Steven Reeves A Crash Course in C Steven Reeves This class will rely heavily on C and C++. As a result this section will help students who are not familiar with C or who need a refresher. By the end of this section

More information

Access Intermediate

Access Intermediate Access 2013 - Intermediate 103-134 Advanced Queries Quick Links Overview Pages AC124 AC125 Selecting Fields Pages AC125 AC128 AC129 AC131 AC238 Sorting Results Pages AC131 AC136 Specifying Criteria Pages

More information

Step 1: Prepare the worksheet data in Excel for the mail merge You can FT Menu Prompt # 1 R for Report.

Step 1: Prepare the worksheet data in Excel for the mail merge You can FT Menu Prompt # 1 R for Report. Creating Address Labels from Microsoft Word Mail Merge If you want to send a mass mailing to an address list that you maintain in a Microsoft Office Excel worksheet, you can use a Microsoft Office Word

More information

C++ Tutorial AM 225. Dan Fortunato

C++ Tutorial AM 225. Dan Fortunato C++ Tutorial AM 225 Dan Fortunato Anatomy of a C++ program A program begins execution in the main() function, which is called automatically when the program is run. Code from external libraries can be

More information

1. Describe History of C++? 2. What is Dev. C++? 3. Why Use Dev. C++ instead of C++ DOS IDE?

1. Describe History of C++? 2. What is Dev. C++? 3. Why Use Dev. C++ instead of C++ DOS IDE? 1. Describe History of C++? The C++ programming language has a history going back to 1979, when Bjarne Stroustrup was doing work for his Ph.D. thesis. One of the languages Stroustrup had the opportunity

More information

Determine a word is a palindrome? bool ispalindrome(string word, int front, int back) { Search if a number is in an array

Determine a word is a palindrome? bool ispalindrome(string word, int front, int back) { Search if a number is in an array Recursion review Thinking recursion: if I know the solution of the problem of size N-, can I use that to solve the problem of size N. Writing recursive routines: Decide the prototype Can formulate both

More information

Excel Shortcuts Increasing YOUR Productivity

Excel Shortcuts Increasing YOUR Productivity Excel Shortcuts Increasing YOUR Productivity CompuHELP Division of Tommy Harrington Enterprises, Inc. tommy@tommyharrington.com https://www.facebook.com/tommyharringtonextremeexcel Excel Shortcuts Increasing

More information

MODULE VI: MORE FUNCTIONS

MODULE VI: MORE FUNCTIONS MODULE VI: MORE FUNCTIONS Copyright 2012, National Seminars Training More Functions Using the VLOOKUP and HLOOKUP Functions Lookup functions look up values in a table and return a result based on those

More information

EXCEL 2003 DISCLAIMER:

EXCEL 2003 DISCLAIMER: EXCEL 2003 DISCLAIMER: This reference guide is meant for experienced Microsoft Excel users. It provides a list of quick tips and shortcuts for familiar features. This guide does NOT replace training or

More information

Student Performance Q&A:

Student Performance Q&A: Student Performance Q&A: 2016 AP Computer Science A Free-Response Questions The following comments on the 2016 free-response questions for AP Computer Science A were written by the Chief Reader, Elizabeth

More information

Excel VLOOKUP. An EMIS Coordinator s Friend

Excel VLOOKUP. An EMIS Coordinator s Friend Excel VLOOKUP An EMIS Coordinator s Friend Vlookup, a function in excel, stands for Vertical Lookup. This function allows you to search a specific table of data, look for a match within the table of data

More information

Review. Outline. Array Pointer Object-Oriented Programming. Fall 2017 CISC2200 Yanjun Li 1. Fall 2017 CISC2200 Yanjun Li 2

Review. Outline. Array Pointer Object-Oriented Programming. Fall 2017 CISC2200 Yanjun Li 1. Fall 2017 CISC2200 Yanjun Li 2 Review Fall 2017 CISC2200 Yanjun Li 1 Outline Array Pointer Object-Oriented Programming Fall 2017 CISC2200 Yanjun Li 2 1 Computer Fall 2017 CISC2200 Yanjun Li 3 Array Arrays are data structures containing

More information

Excel Level 1

Excel Level 1 Excel 2016 - Level 1 Tell Me Assistant The Tell Me Assistant, which is new to all Office 2016 applications, allows users to search words, or phrases, about what they want to do in Excel. The Tell Me Assistant

More information

Review. Outline. Array Pointer Object-Oriented Programming. Fall 2013 CISC2200 Yanjun Li 1. Fall 2013 CISC2200 Yanjun Li 2

Review. Outline. Array Pointer Object-Oriented Programming. Fall 2013 CISC2200 Yanjun Li 1. Fall 2013 CISC2200 Yanjun Li 2 Review Fall 2013 CISC2200 Yanjun Li 1 Outline Array Pointer Object-Oriented Programming Fall 2013 CISC2200 Yanjun Li 2 1 Array Arrays are data structures containing related data items of same type. An

More information

Basic memory model Using functions Writing functions. Basics Prototypes Parameters Return types Functions and memory Names and namespaces

Basic memory model Using functions Writing functions. Basics Prototypes Parameters Return types Functions and memory Names and namespaces Basic memory model Using functions Writing functions Basics Prototypes Parameters Return types Functions and memory Names and namespaces When a program runs it requires main memory (RAM) space for Program

More information

Macros and Preprocessor. CGS 3460, Lecture 39 Apr 17, 2006 Hen-I Yang

Macros and Preprocessor. CGS 3460, Lecture 39 Apr 17, 2006 Hen-I Yang Macros and Preprocessor CGS 3460, Lecture 39 Apr 17, 2006 Hen-I Yang Previously Operations on Linked list (Create and Insert) Agenda Linked List (More insert, lookup and delete) Preprocessor Linked List

More information

Service Line Export and Pivot Table Report (Windows Excel 2010)

Service Line Export and Pivot Table Report (Windows Excel 2010) Service Line Export and Pivot Table Report (Windows Excel 2010) In this tutorial, we will take the Service Lines of the Active Students only and only the most recent record to take a snapshot look at approximate

More information

class Polynomial { public: Polynomial(const string& N = "no name", const vector<int>& C = vector<int>());... };

class Polynomial { public: Polynomial(const string& N = no name, const vector<int>& C = vector<int>());... }; Default Arguments 1 When declaring a C++ function, you may optionally specify a default value for function parameters by listing initializations for them in the declaration: class Polynomial { public:

More information

Objectives. Chapter 2: Basic Elements of C++ Introduction. Objectives (cont d.) A C++ Program (cont d.) A C++ Program

Objectives. Chapter 2: Basic Elements of C++ Introduction. Objectives (cont d.) A C++ Program (cont d.) A C++ Program Objectives Chapter 2: Basic Elements of C++ In this chapter, you will: Become familiar with functions, special symbols, and identifiers in C++ Explore simple data types Discover how a program evaluates

More information

Functions. Lab 4. Introduction: A function : is a collection of statements that are grouped together to perform an operation.

Functions. Lab 4. Introduction: A function : is a collection of statements that are grouped together to perform an operation. Lab 4 Functions Introduction: A function : is a collection of statements that are grouped together to perform an operation. The following is its format: type name ( parameter1, parameter2,...) { statements

More information

Lecture 2: C Programming Basic

Lecture 2: C Programming Basic ECE342 Introduction to Embedded Systems Lecture 2: C Programming Basic Ying Tang Electrical and Computer Engineering Rowan University 1 Facts about C C was developed in 1972 in order to write the UNIX

More information

Chapter 2: Basic Elements of C++

Chapter 2: Basic Elements of C++ Chapter 2: Basic Elements of C++ Objectives In this chapter, you will: Become familiar with functions, special symbols, and identifiers in C++ Explore simple data types Discover how a program evaluates

More information

CS 251 Intermediate Programming Java Basics

CS 251 Intermediate Programming Java Basics CS 251 Intermediate Programming Java Basics Brooke Chenoweth University of New Mexico Spring 2018 Prerequisites These are the topics that I assume that you have already seen: Variables Boolean expressions

More information

Chapter 2: Basic Elements of C++ Objectives. Objectives (cont d.) A C++ Program. Introduction

Chapter 2: Basic Elements of C++ Objectives. Objectives (cont d.) A C++ Program. Introduction Chapter 2: Basic Elements of C++ C++ Programming: From Problem Analysis to Program Design, Fifth Edition 1 Objectives In this chapter, you will: Become familiar with functions, special symbols, and identifiers

More information