10. Visual Basic Functions. Open Excel Click File -> Save As.

Slides:



Advertisements
Similar presentations
Introduction to Excel This class is “HANDS-ON” you will need to open up an excel spreadsheet and do examples as you go along. Students will be able to.
Advertisements

Excel Functions. Part 1. Introduction 2 An Excel function is a formula or a procedure that is performed in the Visual Basic environment, outside the.
Creating & Editing Tables Keyboarding 1A. To Create a Table: From the Menu Bar, select Table select Insert select Table Type in the number of columns.
Excel Services IV: Allow user input Overview: Be selective When you use Excel Services to publish an Excel 2007 spreadsheet to your Microsoft Office SharePoint.
1 After completing this lesson, you will be able to: Create a new presentation using a design template. Enter text in the Slide pane. Create a new slide.
DAY 10: MICROSOFT EXCEL – CHAPTER 8 MICROSOFT EXCEL – CHAPTER 9 MICROSOFT EXCEL – CHAPTER 10 Akhila Kondai September 23, 2013.
Using Excel to Determine NPV and IRR Managerial Accounting Prepared by Diane Tanner University of North Florida Chapter 16.
Excel and Visual Basic. Outline Data exchange between Excel and Visual Basic. Programming VB in Excel.
Excel 101 Excel 101 By Raji Aboulhosn. Using keyboard shortcuts To copy, press Ctrl+C. To cut, press Ctrl+X. To paste, press Ctrl+V. Using the mouse To.
MS-Excel XP Lesson 2. Handling Worksheets 1.Bottom of the every workbook you can get worksheets. 2.No of sheets for a book is three. But you can add,
Office 2003 Post-Advanced Concepts and Techniques M i c r o s o f t Excel Project 7 Using Macros and Visual Basic for Applications (VBA) with Excel.
Using Macros and Visual Basic for Applications (VBA) with Excel
Developing an Excel Application
Office 2003 Introductory Concepts and Techniques M i c r o s o f t Excel Web Feature Creating Static and Dynamic Web Pages Using Excel.
Excel Tutorial 6 Managing Multiple Worksheets and Workbooks
1 Excel Lesson 1 Understanding Excel Fundamentals Microsoft Office 2010 Fundamentals Story / Walls.
Excel Understanding Excel Fundamentals Microsoft Office 2010 Fundamentals 1.
Microsoft Office 2007 Microsoft Excel Collaboration Feature Using SharePoint and Excel Services.
Chapter 2 Formulas, Functions, and Formatting
Excel application for accounting principles. Contents (1) The content of Excel screen. (2) The Excel ribbon. (3) How to create new workbooks. (4) Excel.
Microsoft ® Office Excel Excel 2007 Excel 2007 is the spreadsheet software in the Microsoft 2007 Office Suite. It allows you to store, organize,
Press Esc to Exit ©2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in.
08. Data from Bloomberg Formulas
Copyright 2003, Paradigm Publishing Inc. CHAPTER 6 BACKNEXTEND 6-1 LINKS TO OBJECTIVES Create and Rename a Folder Create and Rename a Folder Delete Workbooks.
Microsoft Excel 2010 Chapter 8
Macros in Excel Intro to lab 1. Macroinstructions Macro is recorded in VBA module sequence of Excel operations Macros can automate tasks in Excel Macro.
Spreadsheet. Objectives Create a new blank workbook. Create a new blank workbook. Identify user interface elements that you can use to accomplish basic.
COMPREHENSIVE Excel Tutorial 8 Developing an Excel Application.
University of Delaware Information Technology User Services.
11. Visual Basic Macro Recorder. Open Excel Click File -> Save As.
Project 9 Using Visual Basic for Applications (VBA) to Customize and Automate Excel Jason C. H. Chen, Ph.D. Professor of Management Information Systems.
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. WORD 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 22 Macros.
Chapter 11: Introduction to the Visual Basic Environment Spreadsheet-Based Decision Support Systems Prof. Name Position (123) University.
06. Excel Charts. File -> Open -> 06b-datastart.xlsx.
Using Advanced Formatting and Analysis Tools. 2 Working with Grouped Worksheets: Grouping Worksheets  Data is entered simultaneously on all worksheets.
Introduction to Video Game Programming (VGP) Mr. Shultz.
® Microsoft Office 2010 Excel Tutorial 1: Getting Started with Excel.
 Objectives Objectives  Introduction Introduction  Exploring Excel Exploring Excel  Navigating a Worksheet Navigating a Worksheet  Workbook Workbook.
How to start Visual Studio 2008 or 2010 (command-line program)
07. Data from Bloomberg Mergers. Launch Bloomberg and Press GO.
Return to the FastCourse Excel 2007 Level 1 book page Lesson 1: Exploring Excel 2007.
Chapter 11: Introduction to VBA Spreadsheet-Based Decision Support Systems Prof. Name Position (123) University Name.
Lesson 14: Exploring Excel Learning Objectives After studying this lesson, you will be able to:  Explain ways Excel can help your productivity.
Lesson 1: Exploring Excel Learning Objectives After studying this lesson, you will be able to:  Explain ways Excel can help your productivity.
1 Excel Lesson 1 Microsoft Excel Basics Microsoft Office 2010 Pasewark & Pasewark.
05. Data from Bloomberg Add-in. Launch Bloomberg and Press GO.
MODULE 9 Integrating Word, Excel, Access, and PowerPoint © Paradigm Publishing, Inc.1.
Microsoft Office 2007 Excel Chapter 9 Part 4: Comparing and merging Workbooks.
Use SPSS for solving the problems Lecture#21. Opening SPSS The default window will have the data editor There are two sheets in the window: 1. Data view2.
Excel Part 4 Working with Charts and Graphics. XP Objectives Create an embedded chart Work with chart titles and legends Create and format a pie chart.
Excel Part 4 Working with Charts and Graphics. XP Objectives Create an embedded chart Work with chart titles and legends Create and format a pie chart.
Chapter 10 Using Macros, Controls and Visual Basic for Applications (VBA) with Excel Microsoft Excel 2013.
Excel Functions. Part 1. Introduction 2 An Excel function is a formula or a procedure that is performed in the Visual Basic environment, outside the.
McGraw-Hill/Irwin The Interactive Computing Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft Excel 2002 Using Macros Lesson.
COMPREHENSIVE Excel Tutorial 12 Expanding Excel with Visual Basic for Applications.
Lecturer: Dalia Mirghani
Excel Tutorial 8 Developing an Excel Application
Beginning of Class (On lined paper)
Data Validation and Protecting Workbook
Columns of data.
EXCEL Introduction.
Microsoft Excel 101.
Microsoft Office Illustrated
TICKET FRONT 9 cm 15 cm.
After completing this lesson, you will be able to:
Microsoft Excel 101.
Chapter 1 Creating a Worksheet and an Embedded Chart
Microsoft Excel 101.
Chapter 6 Lesson 5.
TERMS AND CONDITIONS   These PowerPoint slides are a tool for lecturers, and as such: YOU MAY add content to the slides, delete content from the slides,
Presentation transcript:

10. Visual Basic Functions

Open Excel

Click File -> Save As

Save As a Excel Macro-Enabled Workbook

Click File -> Options

Click Customize Ribbon

Tick Developer

Click OK

Select Developer menu

Functions Excel uses functions to do most calculations =SUM(x) =COUNTIF(x,y) =VLOOKUP(x,y,z ) They take an input value e.g. x, y, z then perform a calculation and return a result We can write our own functions in Visual Basic

Area of a rectangle We want to be able to type in a function such as =RectangleArea(Height, Width) Excel should do the following calculation Area = Height * Width Excel should then give us the result

Click on Visual Basic

Click Insert -> Module

Type Function RectangleArea(Height, Width)

Press Enter on Keyboard and it will add End Function

This means Excel asks you for Height and Width It will then do calculations with these variables

Type RectangleArea = Height * Width

Click Save

Close Visual Basic editor

Click Formulas -> Insert Function

Select Category All

Scroll down to RectangleArea

Click OK

You are asked for Height and Weight

Type in Height 3 and Width 2

Click OK

The result of the function is displayed in the cell

You can also use this function by typing into the cell directly

Click cell B1

Type =RectangleArea(5,3) and press Enter

Calculates the result for you

Pricing a Futures Contract Traders may want to calculate futures prices We want Excel to calculate the Futures price by providing the Spot price, Risk-Free rate and Time =Future(Spot, Rf, Time) Excel should calculate the following formula Future = (Spot)e (Rf)(Time)

Click Visual Basic

Type Function Future(Spot, Rf, Time) Future = Spot * exp(Rf * Time)

Save and Close

Type in the following input values

In cell D10 type =Future(D6,D7,D8) and press Enter

Calculates Futures Price

Challenge Create a function which will calculate the price of a share using the Dividend Growth model You want a user to be able to use a function where they get the price by typing in a function such as: =DGMPrice (Dividend, InterestRate, GrowthRate) Excel should then do the following calculation and return the result DGMPrice = Dividend / (InterestRate – GrowthRate) What is the fair price of a share if it has a dividend of £2, interest rate of 0.06, and growth rate of 0.02?