Objectives • Use semi-selection to create a formula • Use relative, absolute, and mixed cell references in formulas • Avoid circular references • Insert a function • Total values with the SUM function • Insert basic statistical functions
Objectives (continued) • Use date functions • Determine results with the IF function • Use lookup functions • Calculate payments with the PMT function • Create and maintain range names • Use range names in formulas
Using Semi-Selection to Create a Formula • Semi-selection uses the mouse pointer to build a formula containing cell references or ranges • This technique is also called pointing
use when a formula is copied – Absolute $A$1 – Relative A1 – Mixed $A1 or A$1 • $ indicates that the row number or column letter will not be modified during a copy
Mixed Cell References • In mixed reference $A1, the column is fixed, but the row may be altered during a copy • In mixed reference A$1, the row is fixed, but the column may be altered during a copy
Function Basics • An Excel function is a predefined formula that performs a calculation Category Description Compatibility Contains functions compatible with Excel 2007 and earlier. Cube Returns values based on data in a cube, such as validating membership or returning a member’s ranking. Database Analyzes records stored in a database format in Excel and returns key values, such as the number of records or averages value in a field. Date & Time Provides methods for manipulating date and time values.
Function Basics (continued) Category Description Engineering Calculates values commonly used by engineers, such as conversions. Financial Performs financial calculations, such as payments, rates and present/future values. Information Provides information about the contents of a cell, typically displaying TRUE if the cell contains a particular data type, such as a value. Logical Performs logical tests and returns the value of the tests. Includes logical operators such as AND, OR, and NOT. Lookup & Looks up values, creates links to cells, or provides references to cells Reference in a worksheet. Math & Trig Performs standard math and trigonometry calculations. Statistical Performs statistical calculations, such as averages or standard deviation. Text Manipulates text strings, by combining words or converting cases.
Function Terminology • Syntax is the set of rules that govern correct formation of a function • An argument is an input, such as a cell or range • A function begins with the equal sign (=) followed by the function name and arguments in parentheses Example: =SUM(A1:A3)
Totaling Values with SUM • The SUM function returns the mathematical sum of some number of cells or ranges; for example: =SUM(A1:A3) =SUM(A1,B3,C5) =SUM(A1:B3,C5:E8)
Basic Statistical Functions • Common statistical functions include: – AVERAGE arithmetic mean – MEDIAN midpoint value – MIN minimum value – MAX maximum value – COUNT number of values in range – COUNTA number of nonempty cells – COUNTBLANK number of empty cells
Other Math & Trig Functions Function Syntax Description =ABS(number) Displays the positive value of a number. =FREQUENCY(data_array, Counts how often values appear in a given range. bins_array) =INT(number) Rounds a value down to the nearest whole number. =MODE.SNGL(num1, Displays the most frequently occurring value in a [num2],…) list. =PI() Returns the value of pi accurate to 15 digits. =PRODUCT(num1, Multiplies all values within the argument list. [num2],…) =RANDBETWEEN(bottom, Generates a random number between two values. top)
Other Math & Trig Functions Function Syntax Description =RANK.AVG(number, Identifies a value’s rank within a list; returns ref,[order]) average rank for identical values. =RANK.EQ(number, Identifies a value’s rank within a list; the top rank is ref,[order]) identified for identical values. =ROUND(number, Rounds a value to a specific number of digits. num_digits) =SUMPRODUCT(array1, Finds the result of multiplying values in one range [array2],…) by related values in another column and adding products. =TRIMMEAN(array, Returns the average of the internal values in a range percent) by excluding a specified percentage at the upper and lower ends. =TRUNC(number, Returns the integer equivalent of a number by num_digits) truncating the fractional part.
Date Functions • Since dates are numeric, calculations can be performed, such as subtraction • The TODAY function displays the current date • The NOW function displays the current date and time
Making Decisions with the IF Function • =IF(logical_test, value_if_true,value_if_false) • The IF function has three arguments: – A logical test or condition that is true or false – The resulting value if the condition is true – The resulting value if the condition is false
Designing the Logical Test • The logical test is built from the logical operators Operator Description = Equal to <> Not equal to < Less than > Greater than <= Less than or equal to >= Greater than or equal to
Using Functions as Arguments • A nested function occurs when one function is embedded as an argument to another function; for example: =IF(A1<A2,MIN(B1:B5),MAX(B1:B5)) – Compute the MIN function if A1 is less than A2 – Compute the MAX function if A1 is not less than A2
Using Lookup Functions • Lookup functions are used to look up values in a table to perform calculations or display results – For example, a teacher may want to look up an average in order to assign a grade Range Grade 90‐100 A 80‐89 B 70‐79 C 60‐69 D Below 60 F
Creating a Lookup Table • When searching a range, the breakpoint is the lowest value • A lookup table typically lists breakpoints in one column and return values in a second column Range Grade 0 F 60 D 70 C 80 B 90 A
VLOOKUP Function • The VLOOKUP function searches a lookup table for a value and returns the result from the related column • VLOOKUP has three required arguments: – Lookup value – Table array (range of lookup table) – Column index of return value
HLOOKUP Function • The HLOOKUP function is used when the breakpoints and return data are placed in rows • The third argument now lists the row index 0 60 70 80 90 F D C B A
Calculating Payments with the PMT Function • The PMT financial function calculates the periodic payment for a loan with a fixed interest rate and term length • PMT has three required arguments: – Interest rate – Number of periods – Present value (amount of loan)
Range Name Rules • Range names use the following rules: – 1to 255 characters – Begin with a letter or underscore (_) – Contain letters, digits, period, underscore • Valid names include Rate, Tax_Rate, Rate_2012
Creating a Range Name • Excel offers a variety of methods to enter a range name after selecting the cells: – Type the range name in the Name Box area – Enter the name using New Name dialog box
All rights reserved. No part of this publication may be reproduced, stored in
a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written permission of the publisher. Printed in the United States of America.