Lessons 3: Coffee Shop Inventory Unit 1: Using Functions and Formulas Lessons 3: Coffee Shop Inventory
Lesson 3: Coffee Shop Inventory Objectives: Open and move an existing Google Sheets file in Google Drive Understand the parts of a function Learn common functions (Sum, Average, Min and Max) Understand the IF conditional function Use functions in a spreadsheet
What is a Function? Functions are pre-defined formulas that perform common calculations When the values used in a function change, the spreadsheet automatically recalculates the value Ask students if they can determine how a function is different from a formula.
Writing a Function A function typically has three parts: Equal sign Function name Arguments
Equal Sign An equal sign indicates the spreadsheet should perform a calculation. Every function must start with an equal sign.
Function name The function name indicates the operation to preform, such as SUM or AVERAGE.
Arguments The arguments are values, such as a range of cells, used to calculate the function’s value. Not all functions have arguments - e.g. TODAY().
Common Functions- SUM Before revealing, ask students what they think the SUM function might be used for.
Common Functions- SUM The SUM function adds a range of cells.
Common Functions- AVERAGE Before revealing, ask students what they think the AVERAGE function might be used for.
Common Functions- AVERAGE The AVERAGE function adds a range of cells and then divides the number of cell entries to find the average value.
Common Functions- MIN Before revealing, ask students what they think the MIN function might be used for.
Common Functions- MIN The MIN function returns the smallest number from a range of cells.
Common Functions- MAX Before revealing, ask students what they think the MAX function might be used for.
Common Functions- MAX The MAX function returns the largest number from a range of cells.
IF Functions The IF function’s structure is an equal sign, function name (IF) and three arguments; a logical expression, and two values A logical expression is an expression that evaluates to either TRUE or FALSE.
IF Functions Logical expressions can contain: Cell references C4 Text “Empty” Numbers 19 Formulas =(C3+12)/3 Functions AVERAGE(B2:B12)
IF Functions =IF(logical_expression, true_value, false_value) A spreadsheet calculates the value of an IF function by first evaluating the logical expression. If the expression is TRUE, then the first value in the function is used. If the expression is FALSE, then the second value in the function is used.
Ways to Enter Functions 1. Type in the function, and then highlight the cells to fill in the function’s range. 2. Use the function command, under the insert tab.