microsoft excel functions & formulas - nee1983 default · pdf filemicrosoft®...

4
Microsoft ® Excel ® 2010 Functions & Formulas SPOTLIGHT GUIDE T ABLE O F C ONTENTS Functions and formulas are powerful and versatile tools that can perform a variety of calculations using your spreadsheet data. Formulas automate your work, instantly adding up section totals, calculating averages and percentages, and much more. Functions are pre-defined formulas that simplify and standardize statistical, financial, and other calculations. Many Excel functions draw from basic programming formats (e.g. IF/THEN statements). Functions like SUM can be added to your worksheets to dynamically update and display results as data is added or changed. Note: Since some basic knowledge of Excel 2010 is assumed, those in need of a starter guide are referred to the Excel 2010 Quick Reference Guide by Nevada Learning Series. www.nlearnseries.com 2 Basic Functions & Formulas Inserting a Formula Copying Formulas Formula Operators Operator Precedence Function Basics 3 Arrays & Nested Functions More Operators Working with Arrays Single-Cell Arrays Nested Functions Automatic & Manual Calculations 4 Naming & Troubleshooting Naming Cells & Cell Ranges Sample Functions Tracing Cells Evaluating Formulas Glossary Of Terms This list defines key terms used in Excel 2010 and this guide. Example FORMULA: An equation that uses and operates on spreadsheet values =A2*88.8 FUNCTION: A pre-defined formula using arguments to perform a calculation =SUM(A2,88.8) ARGUMENT: Any value that is passed to and utilized by a function =SUM(A2,88.8) CONSTANT: A value that does not change =A2*88.8 REFERENCE: A ‘link’ to values stored elsewhere, such as in cells or cell ranges =A2*88.8 OPERATOR: A symbol defining a relationship between two values =A2*88.8 ARRAY: A sequence of values that is used as a set =A2:K2 Arguments Constant value Reference (to the value in cell A2) Operator (multiply) Array (all values in row 2 from columns A to K) The Formula Bar In Excel 2010, the primary interface for entering and editing formulas is the Formula Bar. All formulas must start with an equals (=) sign and are often enclosed in brackets. For example, a simple formula might look like this: =(A1+A2) Formula Basics Formulas are equations used to manipulate numeric values in spreadsheets. They can be used for simple calculations such as summing up (adding) the values in a column, or for more complex tasks such as payroll or inventory management. Formulas contain a combination of operators, constants, and references. Insert Function button Enter formula Cancel formula changes Click and drag to resize Formula Bar Formula Formula results (cell B4)

Upload: phamque

Post on 03-Feb-2018

236 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Microsoft Excel Functions & Formulas - Nee1983 default · PDF fileMicrosoft® Excel® 2010 Functions & Formulas SPOTLIGHT GUIDE T ABLE O F C ONTENTS Functions and formulas are powerful

Microsoft® Excel® 2010

Functions & Formulas

S P O T L I G H T G U I D E

T A B L E O F C O N T E N T S

Functions and formulas are powerful and versatile tools that can perform a variety of calculations using your spreadsheet data. Formulas automate your work, instantly adding up section totals, calculating averages and percentages, and much more. Functions are pre-defined formulas that simplify and standardize statistical, financial, and other calculations. Many Excel functions draw from basic programming formats (e.g. IF/THEN statements). Functions like SUM can be added to your worksheets to dynamically update and display results as data is added or changed.

Note: Since some basic knowledge of Excel 2010 is assumed, those in need of a starter guide are referred to the Excel 2010 Quick Reference Guide by Nevada Learning Series.

www.nlearnseries.com

2 Basic Functions & FormulasInserting a FormulaCopying FormulasFormula OperatorsOperator PrecedenceFunction Basics

3 Arrays & Nested FunctionsMore OperatorsWorking with ArraysSingle-Cell ArraysNested FunctionsAutomatic & Manual Calculations

4 Naming & TroubleshootingNaming Cells & Cell RangesSample FunctionsTracing CellsEvaluating Formulas

Glossary Of TermsThis list defines key terms used in Excel 2010 and this guide.

Example

FORMULA: An equation that uses and operates on spreadsheet values =A2*88.8

FUNCTION: A pre-defined formula using arguments to perform a calculation =SUM(A2,88.8)

ARGUMENT: Any value that is passed to and utilized by a function =SUM(A2,88.8)

CONSTANT: A value that does not change =A2*88.8

REFERENCE: A ‘link’ to values stored elsewhere, such as in cells or cell ranges =A2*88.8

OPERATOR: A symbol defining a relationship between two values =A2*88.8

ARRAY: A sequence of values that is used as a set =A2:K2

Arguments

Constant value

Reference (to the value in cell A2)

Operator (multiply)

Array (all values in row 2 from columns A to K)

The Formula BarIn Excel 2010, the primary interface for entering and editing formulas is the Formula Bar. All formulas must start with an equals (=) sign and are often enclosed in brackets. For example, a simple formula might look like this: =(A1+A2)

Formula BasicsFormulas are equations used to manipulate numeric values in spreadsheets. They can be used for simple calculations such as summing up (adding) the values in a column, or for more complex tasks such as payroll or inventory management. Formulas contain a combination of operators, constants, and references.

Insert Function button

Enter formula

Cancel formula changes

Click and drag to resize Formula Bar

Formula

Formula results (cell B4)

Page 2: Microsoft Excel Functions & Formulas - Nee1983 default · PDF fileMicrosoft® Excel® 2010 Functions & Formulas SPOTLIGHT GUIDE T ABLE O F C ONTENTS Functions and formulas are powerful

Copyright © 2011 Nevada Learning Series USA, Inc.

2Working with FormulasTo insert a formula:1. Select the cell that will contain the formula results.2. In either the cell or the Formula Bar, enter a formula. You can use cell

references (e.g. A1), constant values (e.g. 88), and operators (e.g. +).

Remember: Functions and formulas always begin with the equals (=) sign!3. Press ENTER, or click the Enter formula icon . The formula results will

appear in your target cell.To cancel changes to a formula: while editing, press ESCAPE or click the Cancel icon .Tip: Selecting any cell containing a formula will show that formula in the Formula Bar for reference/editing.To delete a formula: select the cell containing the formula and press DELETE.

Copying FormulasSelecting a formula from a cell and copying it elsewhere retains relativity; the formula will update its references according to its new location. In other words, the references ‘shift’ with the formula. To maintain absolute references: add a dollar sign ($) before every reference value to be maintained (e.g. $A$4). Now the reference will always refer to this data range, regardless of where the formula is located.

Formula OperatorsOperators are signs that define relationships between values in a spreadsheet. There are four basic operator types: arithmetic, text, reference, and comparison. Reference and comparison operators are covered on page 3.

Operator PrecedenceExcel formulas calculate operators from left to right, and in a very specific order. A handy rule of thumb (and one which you may have learned in high school) is the BEDMAS acronym.Brackets (and the calculations within them) come firstExponents ^ are calculated nextDivision / operators are thirdMultiplication * operators are fourthAddition + operators are fifthSubtraction – is the last operation calculatedTip: To ensure that calculations are performed in the order you want, use brackets to separate important sections of a formula as often as possible.

Arithmetic Operators

Definition Example Result

^ Exponentiation =(2^3) 8

/ Division =(88/8) 11

* Multiplication =(8*11) 88

% Percentage =(88*10%) 8.8

+ Addition =(88+88) 176

- Subtraction =(88-88) 0

Text Concatenation OperatorExcel 2010 formulas can work with text values as well as digits. The concatenation operator (&) combines multiple text and/or numerical values into a single, larger string.

Definition Example Result

& Concatenation =(“2 “&”DAvis st”) 2 DAvis st

This operator is most useful for automatically joining values referenced in large lists (for example, combining separate ‘Street Number’ and ‘Street Name’ columns into a single ‘Address’ column).

Function BasicsFunctions are pre-defined formulas that accept arguments, or specific values that are ‘plugged in’ to them. Functions are designed to evoke common, complex calculations with a single command, and represent a powerful toolset for data analysis and manipulation.

Working with FunctionsThe above function, AVERAGE, calculates the mean average of its arguments — in this case, Sally’s grades. A function works similarly to a formula, with the key difference being that many of its calculations and operators are hidden. The formula =(B2+B3+B4+B5+B6)/6 would get the job done just as well, but using the AVERAGE function is both quicker and cleaner.To insert a function:1. Select the cell that will contain the function results.2. Click the Insert Function icon . Choose a function from the

available list. You can look for more functions by using the search feature or browsing the categories (e.g. Financial, Statistical) from the drop-down list. When you click to select a function, a description and list of related arguments appears (e.g. for SUM, the function requires digits or cell references to add together: numBer1, [numBer2], ...). Select a function and click OK.

3. Enter all arguments for the selected function.4. Click OK. The function results will appear in your target cell.Tip: You can alternatively type functions and function arguments directly into the target cell or Formula Bar (see To insert a formula, left).

Basic Functions & Formulas

Name Box Average function

Function argument (reference to cells 2 - 6 in column B)

Page 3: Microsoft Excel Functions & Formulas - Nee1983 default · PDF fileMicrosoft® Excel® 2010 Functions & Formulas SPOTLIGHT GUIDE T ABLE O F C ONTENTS Functions and formulas are powerful

Copyright © 2011 Nevada Learning Series USA, Inc.

3Arrays & Nested Functions

More OperatorsReference OperatorsReference operators combine cells or cell ranges for calculations, and are often useful for defining function arguments.

Definition ExampleRange operator:

References all cell values between designated start and end cells

=AverAGe(B2:B7)

Union operator,

Combines cell and cell range references

=sum(B2:B4,B6)

Comparison OperatorsComparison operators compare two or more separate values and return a result of TRUE or FALSE, which can be used to define other formulas and functions (e.g. =iF resuLt=”true”, then...).

Definition Example Result= Equal to =(8=88) FALse

> Greater than =(8>88) FALse

>= Greater than or equal to

=(88>=8) true

< Less than =(B7<88) true

<= Less than or equal to =(B7<=8) FALse

<> Not equal to =(B7<>55) FALse

ArraysArray formulas and functions allow you to perform repetitive calculations with a single command, displaying results in a single or multiple cells.

Working with ArraysInstead of inserting seven separate formulas to calculate revenue in the example above, an array formula is used to calculate all the totals at once.

To insert a basic array formula:1. Select the cell range that will hold the results of the array formula.2. In the Formula Bar, enter a formula that references and calculates data from

two or more cell ranges. The bottom-left screenshot example multiplies # Units Sold (B2:B8) with Unit Price (C2:C8). Reference operators (see Reference Operators, left) are especially useful here.

3. Press and hold the CTRL and SHIFT keys, and press ENTER. The array formula is automatically enclosed in braces { }, and the total for each calculation in the array is displayed in the target cells.

Note: Array formulas are often called ‘CSE formulas’, because you must always press CTRL+SHIFT+ENTER to add them. Don’t try to add braces { } manually!To add new information to an array: select the cell range that holds the array. Update the formula/arguments in the Formula Bar, and press CTRL+SHIFT+ENTER.To delete an array formula: select the entire cell range that holds the results of the array formula, and press DELETE.

Single-cell ArraysA single-cell array formula or function can calculate across several ranges of data and display a single result. To add a single-cell array, select an individual cell, rather than a cell range, to hold the results of the array formula or function. The Total Revenue example (screenshot, bottom-left) calculates sum revenue using an array function: {=sum(B2:B8*C2:C8)}

Nested FunctionsExcel 2010 enables you to nest up to seven functions within each other, effectively making them the arguments of other functions.

A Nesting ExampleNested functions can be useful for introducing basic programming features into your spreadsheets, such as IF... THEN statements. Excel’s IF function tests to see whether a particular condition is true or false, then acts accordingly.

Simply, if the largest number in the data set (D2:D8) is greater than, or equal to, 2000, then BEST is displayed. If not, the result shown is WORST.In the sample screenshot to the left, Chris’ revenue of $2,075.00 is the largest number in the data set (determined by the nested MAX function), and is greater than 2000. The ‘true’ condition of the IF function is met and BEST is displayed in the target cell.Remember: Excel calculates formulas and functions according to the BEDMAS structure (see Operator Precedence, page 2), so nested functions should usually be enclosed in brackets ( ) to ensure that these calculations are performed first.

Automatic versus Manual CalculationsExcel can update spreadsheet calculations automatically or, for large files containing many formulas, you can update data in multiple cells before choosing to calculate all the results.To switch between automatic and manual calculations: under the tab, click Calculation Options in the Calculation group, and choose Automatic or Manual.To manually update calculations: under the tab, click Calculate Now in the Calculation group.

Array formula

Displayed results of nested IF function

=iF(mAX(D2:D8)>=2000,”Best”,”WOrst”)

Nested function ‘True’ result ‘False’ result

Page 4: Microsoft Excel Functions & Formulas - Nee1983 default · PDF fileMicrosoft® Excel® 2010 Functions & Formulas SPOTLIGHT GUIDE T ABLE O F C ONTENTS Functions and formulas are powerful

For information on customization, visit our website at www.nlearnseries.com/customTo order other guides in our series, please contact us by email ([email protected]) or by fax (416-487-3121).Microsoft® Excel® 2010: Functions & Formulas Spotlight Guide copyright ©2011 Nevada Learning Series USA, Inc. We assume no responsibility for errors or omissions in this guide. Excel® is a registered trademark of Microsoft®.

ISBN: 978-1-55374-269-2 Printed in the USA

4Naming & Troubleshooting

Naming Cells and Cell RangesIn Excel 2010, you can name cells and cell ranges, and use these names as reference arguments in formulas and functions (e.g. =sum(tOtAL1,tOtAL2)) to simplify complex workbooks.To name a cell or cell range:1. Select the cell or cell range to be named.2. Right-click on the selected cell(s), and choose Define Name.3. In the New Name window, enter a name for the selected cell(s) and,

optionally, a comment. Click OK.Note: You can also name selected cells by typing a name into the Name Box, located left of the Formula Bar.To manage (edit or delete) names in the current workbook: under the

tab, click Name Manager.

Some Useful FunctionsExcel is designed for a diverse user base; many of its financial, engineering, and statistical functions are intended for highly technical and specialized tasks. The following list provides a brief overview of some helpful and frequently-used functions in Excel 2010.

Date/Time Functions

DateFormats a cell so Excel recognizes it as containing a date.

Arguments: Year, Month, Day

Example: =DAte(2009,A2,1)

NowInserts the current date and time into the selected cell (useful for time-stamping a spreadsheet).

Example: =nOW()

Logical Functions

IfChecks whether or not a specified condition is TRUE or FALSE, and returns a chosen value accordingly.

Arguments: Condition test, Value if true, Value if false

Example: =iF(A1>20,”BiGGer!”,”smALLer”)

AndChecks if multiple conditions are met. If so, the value TRUE is returned. If not, the value FALSE is returned.

Arguments: Condition test 1, Condition test 2, ...

Example: =AnD(B2>20,B3>20)

OrChecks if multiple conditions are met. If any are met, the value TRUE is returned. If no conditions are met, the value FALSE is returned.

Arguments: Condition test 1, Condition test 2, ...

Example: =Or(A1>C1,A1>D1)

Text Functions

TrimRemoves extra spaces from text data. Useful for cleaning up large amounts of imported text.

Arguments: Text value

Example: =trim(“sWeet Dee”)

Reference Functions

VlookupAs in a directory, Vlookup uses specific known criteria to reference a table and return a value from a chosen cell range. Useful for consolidating values from multiple worksheets.

Arguments: Value (in leftmost column) to be searched for, Reference of entire data table, Row number where data to be returned is located

Example: =vLOOKuP(“sALes”,A1:B25,2)

Troubleshooting Functions and FormulasTracing Cells

Tracing a cell’s information flow can show you both precedent cells (where that cell’s data comes from) and dependent cells (where that cell’s data goes to). Tracer arrows visually display how a cell interconnects with other elements within a spreadsheet.To trace precedent or dependent cells: select the cell you want to trace. Under the tab, click Trace Precedents and/or Trace Dependents in the Formula Auditing group.To remove tracer arrows: under the tab, click Remove Arrows in the Formula Auditing group. To remove only precedent or dependent tracer arrows, click the drop-down menu arrow on the right side of the button and choose the appropriate option (e.g. Remove Precedent Arrows).Note: Tracer arrows are typically blue. A red arrow indicates an error somewhere in the cell’s formula or function.

Evaluating FormulasTo evaluate a formula:1. Select the cell containing the formula you want to evaluate.2. Under the tab, click Evaluate Formula in the Formula Auditing

group. The Evaluate Formula window opens.3. The Evaluation field displays the formula, and the Reference section lists all

precedent cells that contribute data to the formula. Click to step through your formula one calculation at a time; each underlined segment is calculated as you go. If an error is present (e.g. #NAME?), you can identify the part of the formula where this error first appears.

4. Click . In the Formula Bar, make changes to the formula as needed.

Traced cellPrecedent cells/data