Page 99 - Excel Workbook for Dummies
P. 99

10_798452 ch05.qxp  3/13/06  7:44 PM  Page 82
                  82      Part II: Using Formulas and Functions

                                     2. Use the ← to move the insertion point through the arguments in the SUM func-
                                         tion until the insertion point is flashing between the 8 in the A8 and the comma
                                         that follows the first A4:A8 argument.
                                         Note as you move the insertion point to the left through the SUM function how
                                         the syntax for the SUM function appears right below it and how Excel displays
                                         the Number3, Number2, and finally the Number1 argument in bold as the inser-
                                         tion point travels through the cell range in the equivalent argument in the func-
                                         tion above.
                                     3. Hold down the Shift key as press the ← key to select and highlight the range
                                         A4:A8 (from right to left).
                                     4. Redefine the Number1 argument by dragging through the cell range A2:A8 in the
                                         worksheet.
                                         A moving marquee appears in the cells you select as you redefine the cell range
                                         for the Number1 argument in the SUM function.
                                     5. Check the formula on the Formula bar in cell C9 to make sure that cell range for
                                         the Number1 argument of the SUM function is now A2:A8. Next click the Enter
                                         button to complete the editing of the formula in cell C9.
                                     6. Apply the Comma style format with two decimal places to cell C9 (widen column
                                         C to display the value in this new number formatting, if necessary).
                                     7. Save your editing changes to the formula in cell C9 in the Practice Formulas.xls
                                         workbook file.



                                    Altering the natural order of operations

                                    When you build a formula that combines different operators, Excel follows the order
                                    of precedence shown in Table 5-2. When you use operators that share the same prece-
                                    dence level, the program performs the calculations designated computations on the
                                    operands in a strictly left-to-right order.



                                       Table 5-2     Natural Order of Operator Precedence in Formulas
                                       Precedence           Operator                Type/Function
                                       1                    –                       Negation

                                       2                    %                       Percent
                                       3                    ^                       Exponentiation
                                       4                    * and /                 Multiplication and Division
                                       5                    +and –                  Addition and Subtraction

                                       6                    &                       Concatenation
                                       7                    =, <, >, <=, >=, <>     All Comparative Operators


                                    Sometimes, you need to override the natural order of precedence in order to get your
                                    formula to return the desired result. To override the natural order, you enclose the
                                    operand and operator of the operation you want performed first in parentheses.

                                    For more complicated formulas, you may end up nesting sets of parentheses one
                                    within the other in order to obtain the desired computation order. When this is the
   94   95   96   97   98   99   100   101   102   103   104