Volume 1 Lesson 1 What are Formulas? Worksheets can use numbers entered in certain cells to calculate values in other cells. The equations used to calculate values in a cell are known as formulas. Excel recognizes the contents of a cell as a formula when an equal sign (=) is the first character in the cell. For example, if the formula =8+6 were entered in cell B3, the value of 14 would be displayed in B3 of the worksheet. The formula bar displays the formula =8+6. Structure of a Formula A worksheet formula consists of two components: operands and operators. An operand is a number or cell reference used in formulas. You can key cell reverences in uppercase (A1) or lowercase (a1). An operator tells Excel what to do with the operands. For example, in the formula=B3+5, B3 and 5 are operands. The plus sign (+) is an operator that tells Excel to add the value contained in cell B3 to the number 5. The operators used in formulas are shown in the table below. After you have keyed the formula enter it by pressing the Enter key or by clicking the check mark on the formula bar. Operator Operation Example + * \ ^ Addition Subtraction Multiplication Division Exponentiation B5+C5 C8-232 D4*D5 E6\4 B3^3 Meaning Adds the values in B5 and C5 Subtracts 232 from the value in C8 Multiplies the value in D4 by the value in D5 Divides the value in E6 by 4 Raises the value in B3 to the third power Order if Evaluation Formulas containing more than one operator are called complex formulas. For example, the formula =C3*C4+5 will perform both multiplication and addition to calculate the value in the cell. The sequence used to calculate the value of a formula is called the order of evaluation. Formulas are evaluated in the following order: 1. Contents within parentheses are evaluated first. You may use as many pairs of parentheses as you want. Excel will evaluate the innermost parentheses first. 2. Mathematical operators are evaluated in order of priority, as shown in Table 4-2. 3. Equations are evaluated from left to right if two or more operators have the same order of evaluation. For example, in the formula =20-15-2, the number 15 would be subtracted from 20:then 2 would be subtracted from the difference (5). Order Of Evaluation First Second Third Fourth Operator Exponentiation Positive or negative Multiplication or Division Addition or Subtraction Symbol ^ + Or * Or \ + Or - Relative, Absolute, and Mixed Cell References Three types of cell references are used to create formulas: relative, absolute, and mixed. A relative cell reference adjusts to its new location when copied or moved. For example, in Figure –3, the formula =A3+A4 is copied to B5 and the formula changes to +B3+B4. In other words, this formula is instructing Excel to add the two cells directly above. When the formula is copied or moved, the cell references change, but the operators remain the same. Absolute Cell References do not change when moved or copied to a new cell. To create an absolute reference, you insert a dollar sign ($) before the column letter and/or the row number of the cell reference you want to stay the same. For example, in Figure 4-4, the formula =$A$3+$A4 is copied to B7 and the formula remains the same in the new location. Creating Formulas Quickly You may have already learned how to create formulas by keying the formula or editing existing formulas. In this section, formulas are created quickly by using the point-and-click method and by clicking the AutoSum button. Point-And-Click Method Earlier, you constructed formulas by keying the enter formula in the cell of the worksheet. You can include cell references in a formula more quickly by clicking on the cell rather tan keying the reference. His is known as the point-and-click-method. The point-andclick method is particularly helpful when you have to enter long formulas that contain several cell references. To use the point-and-click method to create a formula, simply substitute keying a cell reference with clicking the cell. For example, to enter the formula =A3+B3 in a cell, you would first highlight the cell that will contain the formula. Then, press =, click a3, press +. Click B3, and press enter. The Auto Sum Button Worksheet users frequently need to long columns of numbers. The Auto Sum button on the toolbar makes this operation simple. The AutoSum button is identified by the Greek letter sigma; to use AutoSum, place the highlight in the cell where you want the total to appear. Click the AutoSum button, and Excels scans the worksheet to determine the most logical column or row of adjacent cells containing numbers to sum. Excel then displays an outline around the range that has been selected. This range is identified in the highlighted cell. If you prefer range other than the one Excel selects, drag to select those cells. Click Enter to display the sum in the cell. The sum of a range is indicated by a special formula in the formula bar called a function formula. For example, if the sum of the range D5:D17 is entered in a cell, the function formula will be =Sum (D5:D17). The SUM function is the most frequently used type of function formula. Function formulas will be discussed in greater detail in the next lesson.