Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

Excel 2003 Working with Functions and Formulas

A formula consists of any of the following elements: Mathematical operators Cell references (including named cells and ranges) Values or text Worksheet functions (such as SUM or AVERAGE) A formula always starts with the equal sign = so that Excel can distinguish it from text. Examples of formulas: =100*.05 Multiplies 100 times 0.05 (This formula only uses values and therefore is not very useful) =A1*A2 Multiplies the contents of cell A1 by the contents of cell A2 (This formula uses cell references.) =Income-Expenses Subtracts the cell named Expenses from the cell named Income

Formula Basics:

Operators used in Formulas:


+ Addition Subtraction * Multiplication / Division ^ Exponentiation & Concatenation = Logical comparison (equal to) > Logical comparison (greater than) < Logical comparison (less than) >= Logical comparison (greater than or equal to) <= Logical comparison (less than or equal to) <> Logical comparison (not equal to) You can use as many operators as you need in a formula.

Operator Precedence in Formulas:


Excel follows a certain order of operators, when it calculates a formula: 1. Items in parentheses 2. Exponentiation 3. Multiplication and division (from left to right) 4. Addition and subtraction (from left to right) Example: =(B2-B3)*B4 will yield a different result than =B2-B3*B4 Exercise: type in values to cells 10 in B2, 5 in B3, 2 in B4 and type in the first formula in B6 and the second in B7, compare the results

Technology Training Support Services 285 5902

Entering Formulas into Your Worksheet:


a. Manually just type the formula starting with the equal sign b. By pointing type an equal sign, click on the cell, type in the operator, click on the next cell

Editing Formulas:
Excel provides multiple ways to edit the contents of a cell: a. Double click on the cell b. Press F2 while the cell is active c. Click on the formula bar while the cell is active

Formula Bar
Name Box displays the reference of the active cell Drops down a list of names The Cancel Button cancels the entry in the The Enter Button accepts the entry in the formula bar Edit Formula initiates the formula editor Entry Area of the formula bar =1+2+3

=1+2+3

Active

References in Formulas:
References identify cells or groups of cells on a worksheet. Column references range from A through IV (256 columns). Row references range from 1 through 16,384 References are of three types: Relative Absolute Mixed A10 $A$10 $A10 or A$10

Use the F4 key to convert relative references to absolute or mixed references. The F4 key cycles through each type.
Technology Training Support Services 285 5902

Do not use the $ in a formula to indicate currency. Excel will attempt to interpret the $ as an anchor. Symbols to Reference to Cells in the Same Worksheet Colons ( : ) between references indicate a range of cells EX: B15:B30 Commas ( , ) Combines multiple nonadjacent cells A Space between references indicates a single cell location (intersection of two ranges) EX: D10:D15 F10:F15 Dollar Sign ($) sets an absolute cell reference. The column or row reference does not change when the formula is copied. EX: $B$3 Symbols to Reference to Cells in Other Worksheets within a workbook Exclamation Point ( ! ) Separates the sheet name from the cell reference EX: =A1*Sheet2!A1 (multiplies the contents of cell A1 in the current sheet with the contents of A1 in sheet2) Single Quotation Marks if the worksheet name has a space EX: =A1*January Budget!A1 (multiplies the contents of cell A1 in the current sheet with the contents of A1 in sheet named January Budget)

Common Formula Errors:


#DIV/0! The formula is trying to divide by zero #NAME? Excel does not recognize the name used in the formula (it may be deleted or you may have unmatched quotes) #REF! The formula refers to a cell that is not valid

Defining Names for cells and ranges:


It is much easier to remember a name than a reference for a cell, or a range of cells. To define a cell name, activate the cell and choose Insert>Name>Define from the menu bar Exercise: 1. Select cell A10 and type 100 and define name Income 2. Select cell A11 and type 50 and define name Expense 3. Select cell A12 and enter formula =Income-Expense

Technology Training Support Services 285 5902

Functions vs. Formulas


Functions are predefined formulas that perform calculations by using specific values, called arguments, in a particular order, or structure. Functions can be used to perform simple or complex calculations.

Working with Functions


Function Built-in formulas that perform special calculations. Argument Part of a formula that contains the specific values necessary to perform the function Equal sign starts the function Function name (not case sensitive) Open parenthesis separates the arguments from the function name Arguments to identify the data required to perform the function Closed parenthesis ends the argument o Example: =SUM(A1:A40) Multiple arguments are separated by commas o Example: =SUM(A1:A40,C1:C40) Adds the values in the ranges A1:A40 and C1:C40 A function may be inserted into a formula o Example: =B2/SUM(A1:A40)

How to Enter Functions:


1. You can enter a function by typing it or you can use the Insert Function Button on the Formula bar. 2. After selecting a function, you are prompted to enter the appropriate argument into the second dialog box. (Required arguments are displayed in bold.) 3. As you enter the arguments, the value of that argument is displayed to the right of the text box

Working with the Function Wizard


The Function Wizard is a handy tool to build functions. Click on to start the function wizard. Select the function you wish to paste from the dialog box:

Technology Training Support Services 285 5902

Fill in the values and click OK to paste the function. Functions can be used to simplify formulas. Below are some examples: Example 1 Formula: =A1+A2+A3+A4+A5+A6+A7+A8+A9 Function: =SUM(A1:A9) Example 2 Formula: =(A1+A2+A3+A4+A5+A6+A7+A8+A9)/9 Function: =AVERAGE(A1:A9) Functions can be embedded into formulas. Example =SUM(A1:A9)*.5 The Auto Sum function is used to build quick formulas for summing rows and columns. The following describes some techniques for using the Auto Sum feature. Multiple sum formulas can be created at the same time using the Auto Sum button. Either of the following two options can be used: OPTION 1: Select the cell or range of cells where you want the Auto Sum results to display. Then click the Auto Sum button. The formula will be automatically built in the cell or range of cells selected. Select the cell or range of cells which contain the set of data you want to sum. Then click on the Auto Sum button. The results will be placed in the first empty row after the range you have selected.

OPTION 2:

Technology Training Support Services 285 5902

Auto Sum can be performed on rows and columns at the same time. This is done by selecting all the data you wish to sum along with the cells where you want the results to display (see Step 1 below). Next click on the Auto Sum button and the formulas will be automatically built (see Step 2 below). Step 1: A B C D E 1 10 10 10 2 20 20 20 3 30 30 30 4 40 40 40 5 6 Step 2: 1 2 3 4 5 6 A 10 20 30 40 100 B 10 20 30 40 100 C 10 20 30 40 100 D 30 60 90 120 300 E

Grand totals can be calculated using the Auto Sum feature. When you have a spread sheet which has subtotals, Excel assumes that you want only the subtotal values included in the grand totals. The raw data used to create the subtotals is ignored. Example: A 1 2 3 4 5 6 7 8 9 10 11 12 13 14 B 10 20 30 40 100 15 25 75 115 22 36 77 135 350 C 10 20 30 40 100 45 65 85 195 56 79 21 156 451 D E

Subtotal

Subtotal

Subtotal Grand Total The Grand Total formula is built by using either of the following options:

Technology Training Support Services 285 5902

OPTION 1:

Selecting the entire range of data (detail and subtotals) then clicking the Auto Sum button. The formula will be automatically built in the next empty row following the range selected. Select the cell or range of cells where you want the Auto Sum results to display. Then click the Auto Sum button. The formula will be automatically built in the cell or range of cells selected.

OPTION 2:

Add a Comment to a Cell


Sometimes you want to add notes or remarks to the worksheet for anyone who reads the worksheet to obtain more information. The Insert Comment will appear in the shortcut menu by: 1. Select the Cells 2. Right Mouse Click on the Selected Cell 3. Select the Insert Comment Option from the List (This option can also be found in: Insert, Comment from the Menu Bar)

Moving Formulas
Select the cell or range of cells you wish to move. Now move the mouse pointer to the outer edge of the selected cell or range of cells until the mouse pointer changes from the thick plus sign to the left upward pointing arrow. Next click and hold the left mouse button and drag the selection to the new location and release the left mouse button. If you move over a previously referenced cell, all other cells which reference the cell you moved over will display the #REF error. Notice that the cell references in the formula you just moved has not changed. Excel does not adjust cell references when moving formulas.

Technology Training Support Services 285 5902

Copying formulas
Select the cell or range of cells you wish to copy. Choose the COPY command to copy the selected cell(s) to the clip board. Select the cell(s) you wish to copy into and choose the PASTE command. Relative references and relative parts of mixed references are automatically adjusted in the area you pasted the copied the cell(s) Absolute and absolute parts of mixed references are not automatically adjusted when copied. Inserting/Deleting Cells and the Affect on References All references (relative and absolute) are automatically adjusted when cells are inserted/deleted. A #REF error will occur if a cell is deleted which has been directly referenced in a formula. Sample: A 1 2 3 =A1+A2+A3 B 1 2 3 =SUM(B1:B 3) C 2 3 =SUM(C2: C3)

1 2 3 4

The result of deleting row 2 is show below: A 1 3 =A1+#REF+A 3 B 1 3 =SUM(B1:B 2) C 3 =SUM(C2: C2)

1 2 3

Technology Training Support Services 285 5902

Excercises:
1. Using the PMT function to determine monthly payments: Suppose you are thinking about purchasing a $120,000 home at 6 percent interest compounded monthly. Use the PMT function to determine your monthly payments on a: a. 15 year loan b. 20 year loan 2. Payroll Information at Sonic Sounds: Open the Sonic1 workbook from the Techtrain Documents folder on your desktop and copy it to your desktop for this exercise. a. Enter your name and the current date (calculated using a function) in the documentation sheet. Switch to Payroll sheet. b. In cell C13, determine the number of years the employee has been employed by subtracting hire date from todays date and diving the difference by 365. c. Use the fill handle to compute years employed for the other employees. d. Use an IF function to compute the 401K contribution for each employee. (Each employee has to have been with Sonic Sound for a year or more to qualify for a 401K contribution.) e. Use an IF function to calculate the health insurance cost for each employee. (First, test whether the employees health plan is Premier plan or not then determine the health insurance cost based on your test.) f. Calculate the total salaries, total 401K and health insurance. g. Calculate total payroll expense for Sonic Sounds.

Technology Training Support Services 285 5902

You might also like