FUNCTIONS FUNCTIONS are : Special formulas that do not use operators to calculate a result (i.e., a...

14

Transcript of FUNCTIONS FUNCTIONS are : Special formulas that do not use operators to calculate a result (i.e., a...

FUNCTIONSFUNCTIONS

FUNCTIONSFUNCTIONS areare:: Special Special formulasformulas that that do do not use operatorsnot use operators to calculate a result (i.e., to calculate a result (i.e., a shortcut formula)a shortcut formula)Example: =SUM(A6:A9)Example: =SUM(A6:A9)

SUM is the functionSUM is the function(A6:A9) is the (A6:A9) is the argumentargument

Note: the colon (:) means “through” and is used to Note: the colon (:) means “through” and is used to connectconnect cell references/cell ranges. cell references/cell ranges.

FUNCTIONS are:FUNCTIONS are: Predefined formulas that Predefined formulas that perform calculations by using specific perform calculations by using specific values, calledvalues, called argumentsarguments, in a particular , in a particular order or structure.order or structure.

Functions can be used to perform Functions can be used to perform simplesimple or or complexcomplex calculations. calculations.

Components of a FunctionComponents of a Function Cell Reference

– Relative Relative Cell ReferenceCell Reference: When the formula in a cell is : When the formula in a cell is copiedcopied or movedor moved, the cell references , the cell references adjust toadjust to its new its new location location ((changes its reference to a new column and rowchanges its reference to a new column and row))

Example: The Formula in cell A5 is =A3+A4Example: The Formula in cell A5 is =A3+A4 It is copied to B5 and it It is copied to B5 and it adjustsadjusts to =B3+B4 to =B3+B4

– Absolute Absolute Cell ReferenceCell Reference:: When the formula is When the formula is copied copied oror movedmoved, the cell references , the cell references remain staticremain static — the — the formula and cell references formula and cell references remain the sameremain the same in the new in the new locationlocation

To create an To create an AbsoluteAbsolute Cell Reference Cell Reference, you insert a , you insert a dollar dollar signsign ($) ($) before the column letter and/or the row number before the column letter and/or the row number of the cell reference you want to remain the same.of the cell reference you want to remain the same.

Example: The Formula in cell A5 is =Example: The Formula in cell A5 is =$$AA$$3+3+$$AA$$44 It is copied to B5 and it It is copied to B5 and it remainsremains =$A$3+=$A$3+

$A$4$A$4

Relative Cell ReferencesRelative Cell References

Cell Cell references references that change that change relative to relative to their new their new location location when a when a formula is formula is copied.copied.

The formula in cell B4 is relative, it adjusts to calculate the average for the student in Row 3 when copied into Cell C4.

Absolute Cell ReferencesAbsolute Cell References

Cell B13, the total goals scored, remains unchanged as the formula calculates the goal percentage for each player.

Mixed Cell ReferenceMixed Cell Reference

A A Mixed Cell ReferenceMixed Cell Reference is a is a combinationcombination of of RelativeRelative andand AbsoluteAbsolute cell references: cell references: – The part of the copied or moved formula that is The part of the copied or moved formula that is

RELATIVERELATIVE adjustsadjusts to its new location to its new location– The part of the copied or moved formula that is The part of the copied or moved formula that is

ABSOLUTEABSOLUTE does NOT adjustdoes NOT adjust to a new location to a new location(Remember: The Absolute cell reference contains (Remember: The Absolute cell reference contains $)$)

Example:Example:The Formula in cell A5 is The Formula in cell A5 is =$A$3=$A$3+A4+A4It is copied to B5. The Formula in cell B5 is now It is copied to B5. The Formula in cell B5 is now =$A$3=$A$3+B4+B4

AbsoluteAbsolute $A$3 did NOT adjust. $A$3 did NOT adjust. RelativeRelative A4 A4 changed to B4.changed to B4.

Common Spreadsheet Common Spreadsheet FunctionsFunctions

SUM:SUM: The sum of the values. Finds the The sum of the values. Finds the sumsum of a range of numbers —of a range of numbers — totalstotals the range the range

(This is the default function for numeric (This is the default function for numeric data)data)

Example: UseExample: Use SUMSUM to calculate totals for the to calculate totals for the waitress’ tips for the Mondays in June.waitress’ tips for the Mondays in June. =SUM(B2:B5)=SUM(B2:B5)

AVERAGE:AVERAGE: The The averageaverage of the values. Finds of the values. Finds the the averageaverage of a range of numbers. of a range of numbers.

Example: To calculate the player’s batting Example: To calculate the player’s batting average for the seasonaverage for the season

Use =AVERAGE(A12:A410)Use =AVERAGE(A12:A410) Examples

More FunctionsMore Functions MAXMAX (Maximum): (Maximum): The The largestlargest value. Finds value. Finds

the the largestlargest number in a range of cells. number in a range of cells.Examples: Examples:

Use MAX to find the highest expenses in the Use MAX to find the highest expenses in the months between June and December.months between June and December.

=MAX(D3:J3)=MAX(D3:J3)Use MAX to find the most overdue payment.Use MAX to find the most overdue payment.

MINMIN (Minimum): (Minimum): The The smallestsmallest value. Finds value. Finds the the smallestsmallest number in a range of cells. number in a range of cells.

=MIN(D3:J3)=MIN(D3:J3)

Examples

Advanced FunctionsAdvanced Functions

IF Statement FunctionsIF Statement Functions Date FunctionsDate Functions Lookup FunctionsLookup Functions List FunctionsList Functions

If StatementIf Statement:: Conditional operators used in spreadsheet functionsConditional operators used in spreadsheet functions Returns one value Returns one value ifif a condition you specify evaluates to a condition you specify evaluates to TRUETRUE

and returns another value and returns another value ifif the condition evaluates to the condition evaluates to FALSEFALSE.. Always contain 3 parts separated by commasAlways contain 3 parts separated by commas

– ““If” statementIf” statement– ““True” answerTrue” answer– ““False” answerFalse” answer

Example:Example:The sales manager wants to know if all the salespersons met their goal of The sales manager wants to know if all the salespersons met their goal of $5000 this month. $5000 this month. Which of the following spreadsheet functions would give him the answer?Which of the following spreadsheet functions would give him the answer?A. =A3>$5000A. =A3>$5000B. =IF(A3,”Yes”,”No”)B. =IF(A3,”Yes”,”No”)C. =IF(A3>$5000)C. =IF(A3>$5000)D. =IF(A3>=5000,”Yes”,”No”)D. =IF(A3>=5000,”Yes”,”No”)

ANSWER: DANSWER: D

StatementsStatements

Date FunctionsDate Functions

Date FunctionsDate Functions– Used to calculate a period of time such as the Used to calculate a period of time such as the

number of days that have elapsed since a value number of days that have elapsed since a value was entered into a specific cellwas entered into a specific cell

– Used to calculate a 30 day due date for a record Used to calculate a 30 day due date for a record of spreadsheet invoicesof spreadsheet invoices NOW date – returns the current dateNOW date – returns the current date DATE360 – calculates the difference in days between 2 DATE360 – calculates the difference in days between 2

datesdates

Examples of Date functions

Lookup FunctionsLookup Functions

Lookup function (values MUST be Lookup function (values MUST be placed in Ascending order)placed in Ascending order)– ArrayArray

Used to compare a cell value to an ARRAY of Used to compare a cell value to an ARRAY of cells and return a value that matches the cells and return a value that matches the location of the value in the arraylocation of the value in the array

– VectorVector Used for 2-column VECTORS or multi-column Used for 2-column VECTORS or multi-column

arrays.arrays.Examples

List FunctionList Function

Used to create a more user-friendly Used to create a more user-friendly spreadsheet atmosphere.spreadsheet atmosphere.– ValidatedValidated

A validated list limits data entry to specific A validated list limits data entry to specific choices programmed into the functionchoices programmed into the function

– Non-ValidatedNon-Validated A non-validated list allows additional entries A non-validated list allows additional entries

other than those provided in the drop-down other than those provided in the drop-down menu.menu.

Count FunctionCount Function

Used to COUNT COUNT the e numbernumber of of data values. Finds data values. Finds how manyhow many cells cells have a value entered.have a value entered.– Count – returns the number of cells in Count – returns the number of cells in

a range that contain numbersa range that contain numbers– CountA – returns the number of cells CountA – returns the number of cells

in a range that contain ANY in a range that contain ANY value/labelvalue/label

– Countlf – returns the number of cells Countlf – returns the number of cells that meet a condition set forth in a that meet a condition set forth in a formula.formula.