Computer Science 1000 Spreadsheets II Permission to redistribute these slides is strictly prohibited without permission.

Slides:



Advertisements
Similar presentations
Formulas, Ranges, and Functions. Formulas n Formulas perform operations such as addition, multiplication, and comparison on worksheet values. n Formulas.
Advertisements

CS1100: Computer Science and Its Applications Building Flexible Models in Microsoft Excel.
Slides 2c: Using Spreadsheets for Modeling - Excel Concepts (Updated 1/19/2005) There are several reasons for the popularity of spreadsheets: –Data are.
Introduction to Excel Formulas, Functions and References.
Pre-defined System Functions Simple IF & VLOOKUP.
Introduction to C Programming
Tutorial 7: Using Advanced Functions and Conditional Formatting
Computer Science 1620 Arithmetic. C++ Math we have seen how to use numbers in our program to represent data however, we can also manipulate this data.
Mathematical Operators  2000 Prentice Hall, Inc. All rights reserved. Modified for use with this course. Introduction to Computers and Programming in.
10 November JavaScript. Presentation Hints What do YOU think makes a good presentation Some of my suggestions Don’t write full sentences on slides Talk,
Chapter 2 Basic Elements of Fortan
 2007 Pearson Education, Inc. All rights reserved Introduction to C Programming.
Data types and variables
Introduction to C Programming
McGraw-Hill/Irwin The Interactive Computing Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft Excel 2002 Exploring Formulas.
College Algebra Prerequisite Topics Review
Spreadsheets Objective 6.02
Copyright 2007, Paradigm Publishing Inc. EXCEL 2007 Chapter 2 BACKNEXTEND 2-1 LINKS TO OBJECTIVES Mathematical OperatorsMathematical Operators Formula.
2 Explain advanced spreadsheet concepts and functions Advanced Calculations 1 Sabbir Saleh_Lecture_17_Computer Application_BBA.
Instructor: Professor Cora Martinez, PhD Department of Civil and Environmental Engineering Florida International University.
Last Week: Excel 101 with Prof. Bliley: Workbooks, worksheets, rows, columns Cells: Text, Value, Formulas Formulas, Ranges OK? Survive Alive? Questions?
Lesson 4 Cell Reference Formulas. Working with Cell References continued… Relative Cell Reference A relative cell reference means that the cell value.
Objectives You should be able to describe: Data Types
Expressions and Interactivity Chapter 3. 2 The cin Object Standard input object Like cout, requires iostream file Used to read input from keyboard Often.
Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall. 1 by Mary Anne Poatsy, Keith Mulbery, Lynn Hogan, Amy Rutledge, Cyndi Krebs, Eric.
Arithmetic operations and operators, converting data types and formatting programs for output. Year 11 Information Technology.
Control Structures – Selection Chapter 4 2 Chapter Topics  Control Structures  Relational Operators  Logical (Boolean) Operators  Logical Expressions.
D-1 University of Washington Computer Programming I Lecture 4: Arithmetic Expressions © 2000 UW CSE.
Input, Output, and Processing
CSC Programming I Lecture 5 August 30, 2002.
# 1# 1 Error Messages, VLookup, Practical Tips What use is VLookup? How do you error check in Excel? CS 105 Spring 2010.
Computer Science 1000 Spreadsheets V Permission to redistribute or use these slides is strictly prohibited without permission.
Numeric and Functional. A cell is the intersection of a row and column Each cell in the spreadsheet has a name – The column-name followed by the row-name.
Introduction to Programming with RAPTOR
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley C H A P T E R 2 Input, Processing, and Output.
Data TypestMyn1 Data Types The type of a variable is not set by the programmer; rather, it is decided at runtime by PHP depending on the context in which.
Computer Science 1620 boolean. Types so far: Integer char, short, int, long Floating Point float, double, long double String sequence of chars.
Computer Science 1000 Spreadsheets IV Permission to redistribute or use these slides is strictly prohibited without permission.
Microsoft ® Excel 2010 Core Skills Lesson 3 Using Formulas Courseware #: 3243 Microsoft ® Office Excel 2010.
Excel 2007 Part (3) Dr. Susan Al Naqshbandi
INTRODUCTION TO SPREADSHEETS MICROSOFT EXCEL. Spreadsheets Allows users to perform simple and complex sorting Allows users to perform calculations quickly.
XP 1 Microsoft Office Excel 2003 Working With Formulas and Functions.
 2008 Pearson Education, Inc. All rights reserved JavaScript: Introduction to Scripting.
1 Chapter 3 – Examples The examples from chapter 3, combining the data types, variables, expressions, assignments, functions and methods with Windows controls.
XP 1 ﴀ New Perspectives on Microsoft Office 2003, Premium Edition Excel Tutorial 2 Microsoft Office Excel 2003 Tutorial 2 – Working With Formulas and Functions.
D-1 University of Washington Computer Programming I Lecture 4: Arithmetic Expressions © 2000 UW CSE.
Chapter 2 Excel Fundamentals Logical IF (Decision) Statements Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Arithmetic, Functions and Input 9/16/13. Arithmetic Operators C++ has the same arithmetic operators as a calculator: * for multiplication: a * b – Not.
Chapter 2: Data and Expressions. Variable Declaration In Java when you declare a variable, you must also declare the type of information it will hold.
Resource Review Excel formula basics Demonstrate how to enter manual formulas Examine some of the available functions and their usage Discuss the.
CS0007: Introduction to Computer Programming Primitive Data Types and Arithmetic Operations.
Spreadsheet Calculations Formulas & Functions Computer Applications I.
OPERATORS IN C CHAPTER 3. Expressions can be built up from literals, variables and operators. The operators define how the variables and literals in the.
Lesson 3: Using Formulas
Contents Introduction Text functions Logical functions
Numeric and Functional
TRACKER Contents Intro Excel 101 Math Operations Formulas 101.
Arithmetic operations and operators, converting data types and formatting programs for output. Year 11 Information Technology.
Excel IF Function.
2.5 Another Java Application: Adding Integers
Statistical Analysis with Excel
Statistical Analysis with Excel
Working with Formulas and Functions
Spreadsheets 2 Explain advanced spreadsheet concepts and functions
CHAPTER 3: String And Numeric Data In Python
Spreadsheets Objective 6.02
Spreadsheets Objective 6.02
Working with Formulas and Functions
Mathematical Formulas and Excel
in Excel Instructor: Zhe He Department of Computer Science
Presentation transcript:

Computer Science 1000 Spreadsheets II Permission to redistribute these slides is strictly prohibited without permission

Spreadsheet Computing spreadsheets can be used exclusively for data formatting and layout however, their most common application is to process data what does this mean? in the context of spreadsheets, it means that the spreadsheet provides new information based on what we supply this information can be in the form of data, but also in formatting (e.g. display negative numbers in red)

Formula a statement in a cell that performs a computation e.g. math equation, table lookup, etc … every formula has a value the result of the computation this is the value that is displayed the formula itself will be displayed in the formula bar formulas can be combined indicated by an initial = sign in other words, when the data in a cell begins with =, Excel interprets the remainder to be a formula

Formulas - Constant constant: a formula whose value is itself examples include: numbers text dates by themselves, constants are not typically expressed as a formula they are usually used in other formulas

Numeric Constant a number

Numeric Constants by themselves, numeric constants aren’t that useful as formulas they have the same functionality outside of formula instead, they are usually used as part of another formula these include: numeric operators function inputs

Numeric Operators Excel accepts the standard math operators +, -, * (times), / (divide), ^ exponent these operators are used in typical binary format e.g. to compute 3+4, enter the formula =3+4

Numeric Operators Question: what happens if I omit the equal sign? Excel interprets the formula as text, as it cannot be interpreted directly as a number or a date (due to the + in the middle). Remember to use = when using formulae.

Numeric Operators Question: what happens when I combine operators? Excel honours the order of operations that you are used to: highest: ^ next: * / lowest: + -

Numeric Operators Question: suppose I want to perform operations out of order (e.g. perform the add before the multiply)? Use parentheses to reorder your operations. Operations in parentheses have the highest priority.

Numeric Operators Example: compute the average of 1,2,3 and 4. Use parentheses to perform the addition before the division.

Numeric Operators Example 2: Recall our transaction spreadsheet. We used all numeric constants. Use formulas to compute the final three amounts:

Text Constants text can also be used as a constant in a formula however, not as simple as putting the text after the = sign Whenever you see a computed value that starts with #, it often indicates an error. In this case, Excel does not know that Kev is meant to be text

Text Constants when text constants are used in a formula, enclose them in double quotes

Text Concatenation like numeric constants, not often used by themselves can be used in concatenation – combine multiple text elements into a single version use the operator &

Text Concatenation when using concatenation, you must specify all of the characters you want to appear a common mistake is to forget about spaces

Mixing Types what happens when we do the following? Excel will attempt to convert the values based on the operator type. In this example, because & accepts two text items, it converts 1000 to “1000”

Mixing Types what happens when we do the following? In this example, because + accepts two numbers, it converts “4” to 4

Mixing Types what happens when we do the following? In this example, because - accepts two numbers, it tries to convert “CS ” to a number. Since this fails, an error is generated.

Mixing Types - Precedence question: what’s the output of the following? The & operator has lower precedence than all of the math operators. Hence, the formula is parsed as: “1” & ( “2” – 4 )  “1” & -2  “1” & “-2”  “1-2”

Functions a preset formula in Excel each function has a name functions accept a set of zero or more inputs surrounded by parentheses separated by commas a function has a value usually, the function performs some computation, and its value is the result of that computation

Function - First Example suppose you want to know the square root of a number Excel has a function called sqrt accepts one input – a value or formula

Function - Inputs note that the input to a function can be another formula, if you like the inside formula is evaluated before its value is sent to the function

Function - Inputs the input to a function can even be another function the inside function is evaluated first its value is sent as the input to the outside function

Function - Inputs your function will expect a particular type as its input will convert if necessary

Function - Inputs your function will expect a particular type as its input an error occurs if it can’t convert

Functions – No Input some functions have no inputs they always return the same value the parentheses are still required, to indicate that it’s a function nothing is placed inside e.g. pi() - returns the value π

Functions – Example compute the volume of a cylinder of radius 10.4 and height 25.6 Formula: V = πr 2 h

Functions – Example spot the error in the formula pi is a function, and hence must have parentheses to indicate this

Functions – Multiple Inputs some functions accept more than one input each input should be separated by commas example: max returns the maximum value amongst all of its inputs

Functions – Multiple Inputs not all inputs need to have the same type e.g. left left accepts a text input S, and a number X, and returns the first X characters in S

Boolean Values a type that can be one of the two following values: TRUE FALSE think of it like yes (TRUE) or no (FALSE) these values can be on their own, or in a formula

Boolean Values some function inputs require boolean values e.g. vlookup (from your lab) the last parameter indicates whether the value you are looking can be an approximate match approximate: TRUE exact: FALSE

Boolean Values instead of specifying Boolean values, they are often computed this is done using comparison operators = (equal) <> (not equal) < (less than) > (greater than) <= (less than or equal to) >= (greater than or equal to)

Comparison Operators can be used on text types can be used on mixed types

If Statement one of the most useful functions in Excel takes three inputs a Boolean value remember: can be a formula that returns a Boolean a “True” value the value of the function if the first input is true a “False” value the value of the function if the first input is false in other words, it selects either the second or third input as its value, depending on whether its first input is true or false

If Statement remember: any of the inputs can be formula themselves Since 3 < 4 is true, the value of this formula is the second input, or sqrt(16)

If Statement remember: any of the inputs can be formula themselves Since 3 > 4 is true, the value of this formula is the third input, or max(6,7)

Excel Functions there are many functions built into Excel Math abs – returns the absolute value of its input sin, cos, tan – returns the sine/cosine/tan value of its input average – returns the average value of its input

Excel Functions there are many functions built into Excel Text len – returns the number of characters in its input string lower – converts all characters in its input to lower case upper – converts all characters in its input to upper case

Excel Functions – Help Excel has a handy feature that assists users in function recall clicking on the formula bar label will activate a dialog that lists all of the functions available in Excel this includes a categorization, and a search feature

Excel Functions – Help furthermore, selecting a function from this list shows a dialog with a place to insert each input, with a description of what it does