excel 2007 training materaial [customized]

120
M.S OFFICE EXCEL 2007 CUSTOMIZED MATERIAL

Upload: polly123

Post on 09-Nov-2015

12 views

Category:

Documents


0 download

DESCRIPTION

Excel 2007 Training Materaial [Customized]

TRANSCRIPT

  • M.S OFFICE EXCEL 2007

    CUSTOMIZED MATERIAL

  • Microsoft Office Excel 2007 Customized Material 2

    Table of Contents

    Section 1 Quick look at the Mathematical Operations . 3

    Section 2 Basic Functions ........................................... 7

    Section 3 Conditional formatting .............................. 22

    Section 4 Relative and Absolute Values ..................... 46

    Section 5 Array Formula ........................................... 47

    Section 6 Using NAMES ............................................. 53

    Section 7 TABLE ........................................................ 63

    Section 8 Advanced Filter .......................................... 67

    Section 9 Data Validation .......................................... 70

    Section 10 Protect Worksheet & Workbook ............... 93

    Section 11 Charts ................................................... 101

  • Microsoft Office Excel 2007 Customized Material 3

    Section 1

    Quick look at the Mathematical Operations

    There are four different types of calculation operators: arithmetic, comparison, text concatenation, and

    reference.

    Arithmetic operators

    To perform basic mathematical operations such as addition, subtraction, or multiplication; combine

    numbers; and produce numeric results, use the following arithmetic operators.

    Arithmetic operator Meaning Example

    + (plus sign) Addition 3+3

    (minus sign) Subtraction Negation

    31 1

    * (asterisk) Multiplication 3*3

    / (forward slash) Division 3/3

    % (percent sign) Percent 20%

    ^ (caret) Exponentiation 3^2

    Comparison operators

    You can compare two values with the following operators. When two values are compared by using these

    operators, the result is a logical value either TRUE or FALSE.

    Comparison operator Meaning Example

    = (equal sign) Equal to A1=B1

    > (greater than sign) Greater than A1>B1

    < (less than sign) Less than A1= (greater than or equal to sign) Greater than or equal to A1>=B1

  • Microsoft Office Excel 2007 Customized Material 4

    Text concatenation operator

    Use the ampersand (&) to join, or concatenate, one or more text strings to produce a single piece of text.

    Text operator Meaning Example

    & (ampersand) Connects, or concatenates, two values to produce one continuous text value ("North"&"wind")

    Reference operators

    Combine ranges of cells for calculations with the following operators.

    Reference operator Meaning Example

    : (colon) Range operator, which produces one reference to all the cells between two references, including the two references

    B5:B15

    , (comma) Union operator, which combines multiple references into one reference SUM(B5:B15,D5:D15)

    (space) Intersection operator, which produces on reference to cells common to the two references

    B7:D7 C6:C8

    The order in which Excel performs operations in formulas

    In some cases, the order in which calculation is performed can affect the return value of the formula, so

    it's important to understand how the order is determined and how you can change the order to obtain

    desired results.

    Calculation order

    Formulas calculate values in a specific order. A formula in Excel always begins with an equal sign (=).

    The equal sign tells Excel that the succeeding characters constitute a formula. Following the equal sign

    are the elements to be calculated (the operands), which are separated by calculation operators. Excel

    calculates the formula from left to right, according to a specific order for each operator in the formula.

  • Microsoft Office Excel 2007 Customized Material 5

    Operator precedence

    If you combine several operators in a single formula, Excel performs the operations in the order shown in

    the following table. If a formula contains operators with the same precedence for example, if a formula

    contains both a multiplication and division operator Excel evaluates the operators from left to right.

    Operator Description

    : (colon)

    (single space)

    , (comma)

    Reference operators

    Negation (as in 1)

    % Percent

    ^ Exponentiation

    * and / Multiplication and division

    + and Addition and subtraction

    & Connects two strings of text (concatenation)

    = < > =

    Comparison

  • Microsoft Office Excel 2007 Customized Material 6

    Use of parentheses

    To change the order of evaluation, enclose in parentheses the part of the formula to be calculated first.

    For example, the following formula produces 11 because Excel calculates multiplication before addition.

    The formula multiplies 2 by 3 and then adds 5 to the result.

    =5+2*3

    In contrast, if you use parentheses to change the syntax, Excel adds 5 and 2 together and then multiplies

    the result by 3 to produce 21.

    =(5+2)*3

    In the example below, the parentheses around the first part of the formula force Excel to calculate B4+25

    first and then divide the result by the sum of the values in cells D5, E5, and F5.

    =(B4+25)/SUM(D5:F5)

    Resources

    Basic Formula Exercise

    Loan Exercise

  • Microsoft Office Excel 2007 Customized Material 7

    Section 2

    Basic Functions

    SUM function

    The SUM function adds all the numbers that you specify as arguments. Each argument can be a range, a

    cell reference, an array, a constant, a formula, or the result from another function. For example,

    SUM(A1:A5) adds all the numbers that are contained in cells A1 through A5. For another example,

    SUM(A1, A3, A5) adds the numbers that are contained in cells A1, A3, and A5.

    Syntax

    SUM(number1, [number2], [number3], [number4], ...)

    The SUM function syntax has the following arguments:

    number1 Required. The first item that you want to add.

    number2, number3, number4, ... Optional. The remaining items that you want to add, up to a

    total of 255 items.

  • Microsoft Office Excel 2007 Customized Material 8

    Example

    The example may be easier to understand if you copy it to a blank worksheet.

    1

    2

    3

    4

    5

    6

    7

    8

    9

    10

    11

    12

    A B C

    Data

    -5

    15

    30

    '5

    TRUE

    Formula Description Result

    =SUM(3, 2) Adds 3 and 2. 5

    =SUM("5", 15, TRUE)

    Adds 5, 15 and 1. The text value "5" is first translated into a number, and the logical value TRUE is first translated into the number 1.

    21

    =SUM(A2:A4) Adds the values in cells A2 through A4. 40

    =SUM(A2:A4, 15)

    Adds the values in cells A2 through A4, and then adds 15 to that result. 55

    =SUM(A5,A6, 2)

    Adds the values in cells A5 and A6, and then adds 2 to that result. Because non-numeric values in references are not translated the value in cell A5 ('5) and the value in cell A6 (TRUE) are both treated as text the values in those cells are ignored.

    2

  • Microsoft Office Excel 2007 Customized Material 9

    MAX function

    Returns the largest value in a set of values.

    Syntax

    MAX(number1,number2,...)

    Number1, number2, ... are 1 to 255 numbers for which you want to find the maximum value.

    Remarks

    Arguments can either be numbers or names, arrays, or references that contain numbers.

    Logical values and text representations of numbers that you type directly into the list of

    arguments are counted.

    If an argument is an array or reference, only numbers in that array or reference are used. Empty

    cells, logical values, or text in the array or reference are ignored.

    If the arguments contain no numbers, MAX returns 0 (zero).

    Arguments that are error values or text that cannot be translated into numbers cause errors.

    If you want to include logical values and text representations of numbers in a reference as part of the calculation, use the MAXA function.

    Example

    1

    2

    3

    4

    5

    6

    A

    Data

    10

    7

    9

    27

    2

    Formula Description (Result)

    =MAX(A2:A6) Largest of the numbers above (27)

    =MAX(A2:A6, 30) Largest of the numbers above and 30 (30)

  • Microsoft Office Excel 2007 Customized Material 10

    MIN function

    Returns the smallest number in a set of values.

    Syntax

    MIN(number1,number2,...)

    Number1, number2, ... are 1 to 255 numbers for which you want to find the minimum value.

    Remarks

    Arguments can either be numbers or names, arrays, or references that contain numbers.

    Logical values and text representations of numbers that you type directly into the list of

    arguments are counted.

    If an argument is an array or reference, only numbers in that array or reference are used. Empty

    cells, logical values, or text in the array or reference are ignored.

    If the arguments contain no numbers, MIN returns 0.

    Arguments that are error values or text that cannot be translated into numbers cause errors.

    If you want to include logical values and text representations of numbers in a reference as part of

    the calculation, use the MINA function.

  • Microsoft Office Excel 2007 Customized Material 11

    Example

    The example may be easier to understand if you copy it to a blank worksheet.

    1

    2

    3

    4

    5

    6

    A

    Data

    10

    7

    9

    27

    2

    Formula Description (Result)

    =MIN(A2:A6) Smallest of the numbers above (2)

    =MIN(A2:A6,0) Smallest of the numbers above and 0 (0)

  • Microsoft Office Excel 2007 Customized Material 12

    COUNT function

    This article describes the formula syntax and usage of the COUNT function (function: A prewritten formula

    that takes a value or values, performs an operation, and returns a value or values. Use functions to

    simplify and shorten formulas on a worksheet, especially those that perform lengthy or complex

    calculations.) in Microsoft Office Excel.

    Description

    The COUNT function counts the number of cells that contain numbers, and counts numbers within the list

    of arguments. Use the COUNT function to get the number of entries in a number field that is in a range or

    array of numbers. For example, you can enter the following formula to count the numbers in the range

    A1:A20:

    =COUNT(A1:A20)

    In this example, if five of the cells in the range contain numbers, the result is 5.

    Syntax

    COUNT(value1, [value2],...)

    The COUNT function syntax has these arguments (argument: A value that provides information to an

    action, an event, a method, a property, a function, or a procedure.):

    value1 Required. The first item, cell reference, or range within which you want to count

    numbers.

    value2, ... Optional. Up to 255 additional items, cell references, or ranges within which you want

    to count numbers.

    NOTE The arguments can contain or refer to a variety of different types of data, but only numbers are

    counted.

  • Microsoft Office Excel 2007 Customized Material 13

    Remarks

    Arguments that are numbers, dates, or a text representation of numbers (for example, a number

    enclosed in quotation marks, such as "1") are counted.

    Logical values and text representations of numbers that you type directly into the list of

    arguments are counted.

    Arguments that are error values or text that cannot be translated into numbers are not counted.

    If an argument is an array or reference, only numbers in that array or reference are counted.

    Empty cells, logical values, text, or error values in the array or reference are not counted.

    If you want to count logical values, text, or error values, use the COUNTA function.

    If you want to count only numbers that meet certain criteria, use the COUNTIF function or the COUNTIFS function.

    Example

    1

    2

    3

    4

    5

    6

    7

    8

    9

    10

    11

    12

    A B C

    Data

    Sales

    12/8/2008

    19

    22.24

    TRUE

    #DIV/0!

    Formula Description Result

    =COUNT(A2:A8) Counts the number of cells that contain numbers in cells A2 through A8.

    3

    =COUNT(A5:A8) Counts the number of cells that contain numbers in cells A5 through A8.

    2

    =COUNT(A2:A8,2) Counts the number of cells that contain numbers in cells A2 through A8, and the value 2

    4

  • Microsoft Office Excel 2007 Customized Material 14

    IF function

    Description

    The IF function returns one value if a condition you specify evaluates to TRUE, and another value if that

    condition evaluates to FALSE. For example, the formula =IF(A1>10,"Over 10","10 or less") returns

    "Over 10" if A1 is greater than 10, and "10 or less" if A1 is less than or equal to 10.

    Syntax

    IF(logical_test, value_if_true, [value_if_false])

    The IF function syntax has the following arguments (argument: A value that provides information to an

    action, an event, a method, a property, a function, or a procedure.):

    logical_test Required. Any value or expression that can be evaluated to TRUE or FALSE. For

    example, A10=100 is a logical expression; if the value in cell A10 is equal to 100, the expression

    evaluates to TRUE. Otherwise, the expression evaluates to FALSE. This argument can use any

    comparison calculation operator.

    value_if_true Required. The value that you want to be returned if the logical_test argument

    evaluates to TRUE. For example, if the value of this argument is the text string "Within budget"

    and the logical_test argument evaluates to TRUE, the IF function returns the text "Within

    budget." If logical_test evaluates to TRUE and the value_if_true argument is omitted (that is,

    there is only a comma following the logical_test argument), the IF function returns 0 (zero). To

    display the word TRUE, use the logical value TRUE for the value_if_true argument.

    value_if_false Optional. The value that you want to be returned if the logical_test argument

    evaluates to FALSE. For example, if the value of this argument is the text string "Over budget"

    and the logical_test argument evaluates to FALSE, the IF function returns the text "Over

    budget." If logical_test evaluates to FALSE and the value_if_false argument is omitted, (that is,

    there is no comma following the value_if_true argument), the IF function returns the logical

    value FALSE. If logical_test evaluates to FALSE and the value of the value_if_false argument

    is omitted (that is, in the IF function, there is no comma following the value_if_true argument),

    the IF function returns the value 0 (zero).

  • Microsoft Office Excel 2007 Customized Material 15

    Remarks

    Up to 64 IF functions can be nested as value_if_true and value_if_false arguments to construct

    more elaborate tests.

    Example 1

    1

    2

    3

    4

    5

    A B C

    Data

    50 23

    Formula Description Result

    =IF(A2

  • Microsoft Office Excel 2007 Customized Material 16

    Example 2

    1

    2

    3

    4

    5

    6

    7

    A B C

    Actual Expenses Predicted Expenses

    1500 900

    500 900

    500 925

    Formula Description Result

    =IF(A2>B2,"Over Budget","OK")

    Checks whether the expenses in row 2 are over budget

    Over Budget

    =IF(A3>B3,"Over Budget","OK")

    Checks whether the expenses in row 3 are over budget

    OK

  • Microsoft Office Excel 2007 Customized Material 17

    COUNTIF function

    This article describes the formula syntax and usage of the COUNTIF function in Microsoft Office Excel.

    Description

    The COUNTIF function counts the number of cells within a range that meet a single criterion that you specify. For example, you can count all the cells that start with a certain letter, or you can count all the cells that contain a number that is larger or smaller than a number you specify. For example, suppose you have a worksheet that contains a list of tasks in column A, and the first name of the person assigned to each task in column B. You can use the COUNTIF function to count how many times a person's name appears in column B and, in that way, determine how many tasks are assigned to that person. For example:

    =COUNTIF(B2:B25,"Nancy")

    Syntax

    COUNTIF(range, criteria)

    The COUNTIF function syntax has the following arguments:

    range Required. One or more cells to count, including numbers or names, arrays, or references

    that contain numbers. Blank and text values are ignored.

    criteria Required. A number, expression, cell reference, or text string that defines which cells

    will be counted. For example, criteria can be expressed as 32, ">32", B4, "apples", or "32".

    NOTES

    You can use the wildcard characters the question mark (?) and the asterisk (*) in

    criteria. A question mark matches any single character, and an asterisk matches any

    sequence of characters. If you want to find an actual question mark or asterisk, type a tilde

    (~) before the character.

    Criteria are case insensitive; for example, the string "apples" and the string "APPLES" will

    match the same cells.

  • Microsoft Office Excel 2007 Customized Material 18

    Example 1: Common COUNTIF formulas

    The example may be easier to understand if you copy it to a blank worksheet.

    1

    2

    3

    4

    5

    6

    7

    8

    9

    10

    11

    12

    A B C

    Data Data

    apples 32

    oranges 54

    peaches 75

    apples 86

    Formula Description Result

    =COUNTIF(A2:A5,"apples") Number of cells with apples in cells A2 through A5.

    2

    =COUNTIF(A2:A5,A4) Number of cells with peaches in cells A2 through A5.

    1

    =COUNTIF(A2:A5,A3)+COUNTIF(A2:A5,A2) Number of cells with oranges and apples in cells A2 through A5.

    3

    =COUNTIF(B2:B5,">55") Number of cells with a value greater than 55 in cells B2 through B5.

    2

    =COUNTIF(B2:B5,""&B4) Number of cells with a value not equal to 75 in cells B2 through B5.

    3

    =COUNTIF(B2:B5,">=32")-COUNTIF(B2:B5,">85")

    Number of cells with a value greater than or equal to 32 and less than or equal to 85 in cells B2 through B5.

    3

  • Microsoft Office Excel 2007 Customized Material 19

    SUMIF function

    This article describes the formula syntax and usage of the SUMIF function (function: A prewritten formula

    that takes a value or values, performs an operation, and returns a value or values. Use functions to

    simplify and shorten formulas on a worksheet, especially those that perform lengthy or complex

    calculations.) in Microsoft Office Excel.

    Description

    You use the SUMIF function to sum the values in a range (range: Two or more cells on a sheet. The cells

    in a range can be adjacent or nonadjacent.) that meet criteria that you specify. For example, suppose that

    in a column that contains numbers, you want to sum only the values that are larger than 5. You can use

    the following formula:

    =SUMIF(B2:B25,">5")

    In this example, the criteria is applied the same values that are being summed. If you want, you can apply

    the criteria to one range and sum the corresponding values in a different range. For example, the formula

    =SUMIF(B2:B5, "John", C2:C5) sums only the values in the range C2:C5, where the corresponding cells

    in the range B2:B5 equal "John."

    NOTE To sum cells based on multiple criteria,.

    Syntax

    SUMIF(range, criteria, [sum_range])

    The SUMIF function syntax has the following arguments (argument: A value that provides information to

    an action, an event, a method, a property, a function, or a procedure.):

    range Required. The range of cells that you want evaluated by criteria. Cells in each range must

    be numbers or names, arrays, or references that contain numbers. Blank and text values are

    ignored.

  • Microsoft Office Excel 2007 Customized Material 20

    criteria Required. The criteria in the form of a number, expression, a cell reference, text, or a

    function that defines which cells will be added. For example, criteria can be expressed as 32,

    ">32", B5, 32, "32", "apples", or TODAY().

    IMPORTANT Any text criteria or any criteria that includes logical or mathematical symbols must

    be enclosed in double quotation marks ("). If the criteria is numeric, double quotation marks are

    not required.

    sum_range Optional. The actual cells to add, if you want to add cells other than those specified

    in the range argument. If the sum_range argument is omitted, Excel adds the cells that are

    specified in the range argument (the same cells to which the criteria is applied).

    NOTES

    The sum_range argument does not have to be the same size and shape as the range

    argument. The actual cells that are added are determined by using theupper leftmost cell in the

    sum_range argument as the beginning cell, and then including cells that correspond in size and

    shape to the range argument. For example:

    If range is And sum_range is Then the actual cells are

    A1:A5 B1:B5 B1:B5

    A1:A5 B1:B3 B1:B5

    A1:B4 C1:D4 C1:D4

    A1:B4 C1:C2 C1:D4

    You can use the wildcard characters the question mark (?) and asterisk (*) as the criteria

    argument. A question mark matches any single character; an asterisk matches any sequence of

    characters. If you want to find an actual question mark or asterisk, type a tilde (~) preceding the

    character.

    Example 1

    The example may be easier to understand if you copy it to a blank worksheet.

  • Microsoft Office Excel 2007 Customized Material 21

    1

    2

    3

    4

    5

    6

    7

    8

    9

    10

    A B C

    Property Value Commission Data

    100,000 7,000 250,000

    200,000 14,000

    300,000 21,000

    400,000 28,000

    Formula Description Result

    =SUMIF(A2:A5,">160000",B2:B5) Sum of the commissions for property values over 160,000.

    63,000

    =SUMIF(A2:A5,">160000") Sum of the property values over 160,000. 900,000

    =SUMIF(A2:A5,300000,B2:B5) Sum of the commissions for property values equal to 300,000.

    21,000

    =SUMIF(A2:A5,">" & C2,B2:B5) Sum of the commissions for property values greater than the value in C2.

    49,000

    Resources

    Function Step By Step

    Basic Functions Exercise

    IF function Step By Step

    IF function Exercise

  • Microsoft Office Excel 2007 Customized Material 22

    Section 3

    Conditional formatting

    The benefits of conditional formatting

    Whenever you analyze data, you often ask yourself questions, such as:

    Where are the exceptions in a summary of profits over the past five years?

    What are the trends in a marketing opinion poll over the past two years?

    Who has sold more than $50,000 dollars this month?

    What is the overall age distribution of employees?

    Which products have greater than 10% revenue increases from year to year?

    Who are the highest performing and lowest performing students in the freshman class?

    Conditional formatting helps to answer these questions by making it easy to highlight interesting cells or

    ranges of cells, emphasize unusual values, and visualize data by using data bars, color scales, and icon

    sets. A conditional format changes the appearance of a cell range based on a condition (or criteria). If the

    condition is true, the cell range is formatted based on that condition; if the conditional is false, the cell

    range is not formatted based on that condition.

    NOTE When you create a conditional format, you can only reference other cells on the same worksheet;

    you cannot reference cells on other worksheets in the same workbook, or use external references to

    another workbook.

  • Microsoft Office Excel 2007 Customized Material 23

    Format all cells by using a two-color scale

    Color scales are visual guides that help you understand data distribution and variation. A two-color scale

    helps you compare a range of cells by using a gradation of two colors. The shade of the color represents

    higher or lower values. For example, in a green and red color scale, you can specify that higher value

    cells have a more green color and lower value cells have a more red color.

    If one or more cells in the range contain a formula that returns an error, the conditional formatting is not

    applied to the entire range. To ensure that the conditional formatting is applied to the entire range, use an

    IS or IFERROR function to return a value other than an error value.

    Quick formatting

    1. Select one or more cells in a range, table, or PivotTable report.

    2. On the Home tab, in the Styles group, click the arrow next to Conditional Formatting, and then

    click Color Scales.

    3. Select a two-color scale.

    TIP Hover over the color scale icons to see which icon is a two-color scale. The top color

    represents higher values, and the bottom color represents lower values.

    TIP You can change the method of scoping for fields in the Values area of a PivotTable report by using

    the Apply formatting rule to options button.

  • Microsoft Office Excel 2007 Customized Material 24

    Advanced formatting

    1. Select one or more cells in a range, table, or PivotTable report.

    2. On the Home tab, in the Styles group, click the arrow next to Conditional Formatting, and then

    click Manage Rules.

    The Conditional Formatting Rules Manager dialog box is displayed.

    3. Do one of the following:

    To add a conditional format, click New Rule.

    The New Formatting Rule dialog box is displayed.

    To change a conditional format, do the following:

    1. Make sure that the appropriate worksheet, table, or PivotTable report is selected in

    the Show formatting rules for list box.

    2. Optionally, change the range of cells by clicking Collapse Dialog in the Applies

    to box to temporarily hide the dialog box, by selecting the new range of cells on the

    worksheet, and then by selecting Expand Dialog .

    3. Select the rule, and then click Edit rule.

    The Edit Formatting Rule dialog box is displayed.

    4. Under Apply Rule To, to optionally change the scope for fields in the Values area of a

    PivotTable report by:

    Selection, click Just these cells.

    Corresponding field, click All cells with the same fields.

    Value field, click All cells.

    5. Under Select a Rule Type, click Format all cells based on their values.

    6. Under Edit the Rule Description, in the Format Style list box, select 2-Color Scale.

    7. Select a Minimum and Maximum Type. Do one of the following:

  • Microsoft Office Excel 2007 Customized Material 25

    Format lowest and highest values Select Lowest Value and Highest Value.

    In this case, you do not enter a Minimum and Maximum Value.

    Format a number, date, or time value Select Number, and then enter a Minimum and

    Maximum Value.

    Format a percentage Select Percent, and then enter a Minimum and Maximum Value.

    Valid values are from 0 (zero) to 100. Do not enter a percent sign.

    Use a percentage when you want to visualize all values proportionally because the

    distribution of values is proportional.

    Format a percentile Select Percentile and then enter a Minimum and Maximum Value.

    Valid percentiles are from 0 (zero) to 100. You cannot use a percentile if the range of cells

    contains more than 8,191 data points.

    Use a percentile when you want to visualize a group of high values (such as the top

    20thpercentile) in one color grade proportion and low values (such as the bottom 20

    th

    percentile) in another color grade proportion, because they represent extreme values that

    might skew the visualization of your data.

    Format a formula result Select Formula, and then enter a Minimum and Maximum

    Value.

    The formula must return a number, date, or time value. Start the formula with an equal sign

    (=). Invalid formulas result in no formatting applied. It's a good idea to test the formula in

    the worksheet to make sure that the formula doesn't return an error value.

    8. NOTES

    Minimum and Maximum values are the minimum and maximum values for the range of

    cells. Make sure that the Minimum value is less than the Maximum value.

  • Microsoft Office Excel 2007 Customized Material 26

    You can choose a different Minimum and Maximum Type. For example, you can choose

    a Minimum Number and Maximum Percent.

    9. To choose a Minimum and Maximum color scale, click Color for each, and then select a color.

    If you want to choose additional colors or create a custom color, click More Colors.

    The color scale that you select is displayed in the Preview box.

    Format all cells by using a three-color scale

    Color scales are visual guides that help you understand data distribution and variation. A three-color

    scale helps you compare a range of cells by using a gradation of three colors. The shade of the color

    represents higher, middle, or lower values. For example, in a green, yellow, and red color scale, you can

    specify that higher value cells have a green color, middle value cells have a yellow color, and lower value

    cells have a red color.

    If one or more cells in the range contain a formula that returns an error, the conditional formatting is not

    applied to the entire range. To ensure that the conditional formatting is applied to the entire range, use an

    IS or IFERROR function to return a value other than an error value.

    Quick formatting

    1. Select one or more cells in a range, table, or PivotTable report.

    2. On the Home tab, in the Styles group, click the arrow next to Conditional Formatting, and then

    click Color Scales.

    3. Select a three-color scale. The top color represents higher values, the center color represents

    middle values, and the bottom color represents lower values.

    TIP Hover over the color scale icons to see which icon is a three-color scale.

  • Microsoft Office Excel 2007 Customized Material 27

    TIP You can change the method of scoping for fields in the Values area of a PivotTable report by using

    the Apply formatting rule to options button.

    Advanced formatting

    1. Select one or more cells in a range, table, or PivotTable report.

    2. On the Home tab, in the Styles group, click the arrow next to Conditional Formatting, and then

    click Manage Rules.

    The Conditional Formatting Rules Manager dialog box is displayed.

    3. Do one of the following:

    To add a conditional format, click New Rule.

    The New Formatting Rule dialog box is displayed.

    To change a conditional format, do the following:

    1. Make sure that the appropriate worksheet, table, or PivotTable report is selected in

    the Show formatting rules for list box.

    2. Optionally, change the range of cells by clicking Collapse Dialog in the Applies

    to box to temporarily hide the dialog box, by selecting the new range of cells on the

    worksheet, and then by selecting Expand Dialog .

    3. Select the rule, and then click Edit rule.

    The Edit Formatting Rule dialog box is displayed.

    4. Under Apply Rule To, to optionally change the scope for fields in the Values area of a

    PivotTable report by:

    Selection, click Just these cells.

    Corresponding field, click All cells with the same fields.

    Value field, click All cells.

    5. Under Select a Rule Type, click Format all cells based on their values.

  • Microsoft Office Excel 2007 Customized Material 28

    6. Under Edit the Rule Description, in the Format Style list box, select 3-Color Scale.

    7. Select a Minimum, Midpoint, and Maximum Type. Do one of the following:

    Format lowest and highest values Select a Midpoint.

    In this case, you do not enter a Lowest and Highest Value.

    Format a number, date, or time value Select Number, and then enter a Minimum,

    Midpoint, and Maximum Value.

    Format a percentage Select Percent, and then enter a Minimum, Midpoint, and

    Maximum Value.

    Valid values are from 0 (zero) to 100. Do not enter a percent sign.

    Use a percentage when you want to visualize all values proportionally because the

    distribution of values is proportional.

    Format a percentile Select Percentile and then enter a Minimum, Midpoint, and

    Maximum Value.

    Valid percentiles are from 0 (zero) to 100. You cannot use a percentile if the range of cells

    contains more than 8,191 data points.

    Use a percentile when you want to visualize a group of high values (such as the top 20th

    percentile) in one color grade proportion and low values (such as the bottom 20th

    percentile) in another color grade proportion, because they represent extreme values that

    might skew the visualization of your data.

    Format a formula result Select Formula, and then enter a Minimum, Midpoint, and

    Maximum Value.

    The formula must return a number, date, or time value. Start the formula with an equal sign

    (=). Invalid formulas result in no formatting applied. It's a good idea to test the formula in

    the worksheet to make sure that the formula doesn't return an error value.

    8. NOTES

  • Microsoft Office Excel 2007 Customized Material 29

    Minimum, Midpoint, and Maximum values are the minimum, midpoint, and maximum

    values for the range of cells. Make sure that the Minimum value is less than the Midpoint

    value, which in turn, is less than the Maximum value.

    You can choose a different Minimum, Midpoint, and Maximum Type. For example, you

    can choose a Minimum Number, Midpoint Percentile, and Maximum Percent.

    In many cases, the default Midpoint value of 50 percent works best, but you can adjust this

    to fit unique requirements.

    9. To choose a Minimum, Midpoint, and Maximum color scale, click Color for each, and then

    select a color.

    If you want to choose additional colors or create a custom color, click More Colors.

    The color scale that you select is displayed in the Preview box.

    Format all cells by using data bars

    A data bar helps you see the value of a cell relative to other cells. The length of the data bar represents

    the value in the cell. A longer bar represents a higher value, and a shorter bar represents a lower value.

    Data bars are useful in spotting higher and lower numbers, especially with large amounts of data, such as

    top selling and bottom selling toys in a holiday sales report.

    Issue: I don't see my conditional formatting for any cell in the range.

    If one or more cells in the range contain a formula that returns an error, the conditional formatting is not

    applied to the entire range. To ensure that the conditional formatting is applied to the entire range, use an

    IS or IFERROR function to return a value other than an error value.

  • Microsoft Office Excel 2007 Customized Material 30

    Quick formatting

    1. Select one or more cells in a range, table, or PivotTable report.

    2. On the Home tab, in the Style group, click the arrow next to Conditional Formatting, click Data

    Bars, and then select a data bar icon.

    TIP You can change the method of scoping for fields in the Values area of a PivotTable report by using

    the Apply formatting rule to options button.

    Advanced formatting

    1. Select one or more cells in a range, table, or PivotTable report.

    2. On the Home tab, in the Styles group, click the arrow next to Conditional Formatting, and then

    click Manage Rules.

    The Conditional Formatting Rules Manager dialog box is displayed.

    3. Do one of the following:

    To add a conditional format, click New Rule.

    The New Formatting Rule dialog box is displayed.

    To change a conditional format, do the following:

    a) Make sure that the appropriate worksheet, table, or PivotTable report is selected in

    the Show formatting rules for list box.

    b) Optionally, change the range of cells by clicking Collapse Dialog in the Applies

    to box to temporarily hide the dialog box, by selecting the new range of cells on the

    worksheet, and then by selecting Expand Dialog .

    c) Select the rule, and then click Edit rule.

    The Edit Formatting Rule dialog box is displayed.

  • Microsoft Office Excel 2007 Customized Material 31

    4. Under Apply Rule To, to optionally change the scope for fields in the Values area of a

    PivotTable report by:

    Selection, click Just these cells.

    Corresponding field, click All cells with the same fields.

    Value field, click All cells.

    5. Under Select a Rule Type, click Format all cells based on their values.

    6. Under Edit the Rule Description, in the Format Style list box, select Data Bar.

    7. Select a Shortest Bar and Longest Bar Type. Do one of the following:

    Format lowest and highest values Select Lowest Value and Highest Value.

    In this case, you do not enter a Shortest Bar and Longest Bar Value.

    Format a number, date, or time value Select Number, and then enter a Shortest Bar

    and Longest Bar Value.

    Format a percentage Select Percent, and then enter a Shortest Bar and Longest Bar

    Value.

    Valid values are from 0 (zero) to 100. Do not enter a percent sign.

    Use a percentage when you want to visualize all values proportionally because the

    distribution of values is proportional.

    Format a percentile Select Percentile and then enter a Shortest Bar and Longest Bar

    Value.

    Valid percentiles are from 0 (zero) to 100. You cannot use a percentile if the range of cells

    contains more than 8,191 data points.

    Use a percentile when you want to visualize a group of high values (such as the top 20th

    percentile) in one data bar proportion and low values (such as the bottom 20th percentile) in

    another data bar proportion, because they represent extreme values that might skew the

    visualization of your data.

  • Microsoft Office Excel 2007 Customized Material 32

    Format a formula result Select Formula, and then enter a Shortest Bar and Longest

    Bar Value.

    The formula must return a number, date, or time value. Start the formula with an equal sign

    (=). Invalid formulas result in no formatting applied. It's a good idea to test the formula in

    the worksheet to make sure that the formula doesn't return an error value.

    8. NOTES

    Make sure that the Shortest Bar value is less than the Longest Bar value.

    You can choose a different Shortest Bar and Longest Bar Type. For example, you can

    choose a Shortest Bar Number and Longest Bar Percent.

    9. To choose a Shortest Bar and Longest Bar color scale, click Bar Color.

    If you want to choose additional colors or create a custom color, click More Colors.

    The bar color that you select is displayed in the Preview box.

    10. To show only the data bar and not the value in the cell, select Show Bar Only.

    Top of Page

    Format all cells by using an icon set

    Use an icon set to annotate and classify data into three to five categories separated by a threshold value.

    Each icon represents a range of values. For example, in the 3 Arrows icon set, the green up arrow

    represents higher values, the yellow sideways arrow represents middle values, and the red down arrow

    represents lower values.

    If one or more cells in the range contain a formula that returns an error, the conditional formatting is not

    applied to the entire range. To ensure that the conditional formatting is applied to the entire range, use an

    IS or IFERROR function to return a value other than an error value.

    Quick formatting

  • Microsoft Office Excel 2007 Customized Material 33

    1. Select one or more cells in a range, table, or PivotTable report.

    2. On the Home tab, in the Style group, click the arrow next to Conditional Formatting, click Icon

    Set, and then select an icon set.

    TIP You can change the method of scoping for fields in the Values area of a PivotTable report by using

    the Apply formatting rule to options button.

    Advanced formatting

    1. Select one or more cells in a range, table, or PivotTable report.

    2. On the Home tab, in the Styles group, click the arrow next to Conditional Formatting, and then

    click Manage Rules.

    The Conditional Formatting Rules Manager dialog box is displayed.

    3. Do one of the following:

    To add a conditional format, click New Rule.

    The New Formatting Rule dialog box is displayed.

    To change a conditional format, do the following:

    1. Make sure that the appropriate worksheet, table, or PivotTable report is selected in

    the Show formatting rules for list box.

    2. Optionally, change the range of cells by clicking Collapse Dialog in the Applies

    to box to temporarily hide the dialog box, by selecting the new range of cells on the

    worksheet, and then by selecting Expand Dialog .

    3. Select the rule, and then click Edit rule.

    The Edit Formatting Rule dialog box is displayed.

    4. Under Apply Rule To, to optionally change the scope for fields in the Values area of a

    PivotTable report by:

    Selection, click Just these cells.

    Corresponding field, click All cells with the same fields.

    Value field, click All cells.

  • Microsoft Office Excel 2007 Customized Material 34

    5. Under Select a Rule Type, click Format all cells based on their values.

    6. Under Edit the Rule Description, in the Format Style list box, select Icon Set.

    1. Select an icon set. The default is 3 Traffic Lights (Unrimmed). The number of icons and

    the default comparison operators and threshold values for each icon can vary for each icon

    set.

    2. If you want, you can adjust the comparison operators and threshold values. The default

    range of values for each icon are equal in size, but you can adjust these to fit your unique

    requirements. Make sure that the thresholds are in a logical sequence of highest to lowest

    from top to bottom.

    3. Do one of the following:

    Format a number, date, or time value Select Number.

    Format a percentage Select Percent.

    Valid values are from 0 (zero) to 100. Do not enter a percent sign.

    Use a percentage when you want to visualize all values proportionally because the

    distribution of values is proportional.

    Format a percentile Select Percentile.

    Valid percentiles are from 0 (zero) to 100. You cannot use a percentile if the range of

    cells contains more than 8,191 data points.

    Use a percentile when you want to visualize a group of high values (such as the top

    20th percentile) in one data bar proportion and low values (such as the bottom 20

    th

    percentile) in another data bar proportion, because they represent extreme values

    that might skew the visualization of your data.

  • Microsoft Office Excel 2007 Customized Material 35

    Format a formula result Select Formula, and then enter a formula in each Value

    box.

    The formula must return a number, date, or time value. Start the formula with an equal

    sign (=). Invalid formulas result in no formatting applied. It's a good idea to test the

    formula in the worksheet to make sure that the formula doesn't return an error value.

    4. To make the first icon represent lower values and the last icon represent higher values,

    select Reverse Icon Order.

    5. To show only the icon and not the value in the cell, select Show Icon Only.

    NOTES

    You may need to adjust the column width to accommodate the icon.

    There are three sizes of icons. The size of the icon that is displayed depends on the font

    size that is used in that cell.

    Format only cells that contain text, number, or date or time values

    To more easily find specific cells within a range of cells, you can format those specific cells based on a

    comparison operator. For example, in an inventory worksheet sorted by categories, you can highlight the

    products with fewer than 10 items on hand in yellow. Or, in a retail store summary worksheet, you can

    identify all stores with profits greater than 10%, sales volumes less than $100,000, and region equal to

    "SouthEast".

    NOTE You cannot conditionally format fields in the Values area of a PivotTable report by text or date,

    only by number.

  • Microsoft Office Excel 2007 Customized Material 36

    Quick formatting

    1. Select one or more cells in a range, table, or PivotTable report.

    2. On the Home tab, in the Style group, click the arrow next to Conditional Formatting, and then

    click Highlight Cells Rules.

    3. Select the command that you want, such as Between, Equal To Text that Contains, or A Date

    Occurring.

    4. Enter the values that you want to use, and then select a format.

    TIP You can change the method of scoping for fields in the Values area of a PivotTable report by using

    the Apply formatting rule to options button.

    Advanced formatting

    1. Select one or more cells in a range, table, or PivotTable report.

    2. On the Home tab, in the Styles group, click the arrow next to Conditional Formatting, and then

    click Manage Rules.

    The Conditional Formatting Rules Manager dialog box is displayed.

    3. Do one of the following:

    To add a conditional format, click New Rule.

    The New Formatting Rule dialog box is displayed.

    To change a conditional format, do the following:

    1. Make sure that the appropriate worksheet, table, or PivotTable report is selected in

    the Show formatting rules for list box.

  • Microsoft Office Excel 2007 Customized Material 37

    2. Optionally, change the range of cells by clicking Collapse Dialog in the Applies

    to box to temporarily hide the dialog box, by selecting the new range of cells on the

    worksheet, and then by selecting Expand Dialog .

    3. Select the rule, and then click Edit rule.

    The Edit Formatting Rule dialog box is displayed.

    4. Under Apply Rule To, to optionally change the scope for fields in the Values area of a

    PivotTable report by:

    Selection, click Just these cells.

    Corresponding field, click All cells with the same fields.

    Value field, click All cells.

    5. Under Select a Rule Type, click Format only cells that contain.

    6. Under Edit the Rule Description, in the Format only cells with list box, do one of the

    following:

    Format by number, date, or time Select Cell Value, select a comparison operator, and

    then enter a number, date, or time.

    For example, select Between and then enter 100 and 200, or select Equal to and then

    enter 1/1/2006.

    You can also enter a formula that returns a number, date, or time value. If you enter a

    formula, start it with an equal sign (=). Invalid formulas result in no formatting applied. It's a

    good idea to test the formula in the worksheet to make sure that the formula doesn't return

    an error value.

  • Microsoft Office Excel 2007 Customized Material 38

    Format by text Select Specific Text, select a comparison operator, and then enter text.

    For example, select Contains and then enter Silver, or select Starting with and then enter

    Tri.

    Quotes are included in the search string, and you may use wildcard characters. The

    maximum length of a string is 255 characters.

    You can also enter a formula that returns text. If you enter a formula, start it with an equal

    sign (=). Invalid formulas result in no formatting applied. It's a good idea to test the formula

    in the worksheet to make sure that the formula doesn't return an error value.

    Format by date Select Dates Occurring, and then select a date comparison.

    For example, select Yesterday or Next week.

    Format cells with blanks or no blanks Select Blanks or No Blanks.

    NOTE A blank value is a cell that contains no data and is different than a cell that

    contains one or more spaces (which are text).

    Format cells with error or no error values Select Errors or No Errors.

    Error values include: #####, #VALUE!, #DIV/0!, #NAME?, #N/A, #REF!, #NUM!, and

    #NULL!.

    7. To specify a format, click Format.

    The Format Cells dialog box is displayed.

    8. Select the number, font, border, or fill format that you want to apply when the cell value meets

    the condition, and then click OK.

    You can choose more than one format. The formats that you select are displayed in the Preview

    box.

  • Microsoft Office Excel 2007 Customized Material 39

    Format only values that are above or below average

    You can find values above or below an average or standard deviation in a range of cells. For example,

    you can find the above average performers in an annual performance review or you can locate

    manufactured materials that fall below two standard deviations in a quality rating.

    Quick formatting

    1. Select one or more cells in a range, table, or PivotTable report.

    2. On the Home tab, in the Style group, click the arrow next to Conditional Formatting, and then

    click Top/Bottom Rules.

    3. Select the command that you want, such as Above Average or Below Average.

    4. Enter the values that you want to use, and then select a format.

    TIP You can change the method of scoping for fields in the Values area of a PivotTable report by using

    the Apply formatting rule to options button.

  • Microsoft Office Excel 2007 Customized Material 40

    Advanced formatting

    1. Select one or more cells in a range, table, or PivotTable report.

    2. On the Home tab, in the Styles group, click the arrow next to Conditional Formatting, and then

    click Manage Rules.

    The Conditional Formatting Rules Manager dialog box is displayed.

    3. Do one of the following:

    To add a conditional format, click New Rule.

    The New Formatting Rule dialog box is displayed.

    To change a conditional format, do the following:

    1. Make sure that the appropriate worksheet, table, or PivotTable report is selected in

    the Show formatting rules for list box.

    2. Optionally, change the range of cells by clicking Collapse Dialog in the Applies

    to box to temporarily hide the dialog box, by selecting the new range of cells on the

    worksheet, and then by selecting Expand Dialog .

    3. Select the rule, and then click Edit rule.

    The Edit Formatting Rule dialog box is displayed.

    4. Under Apply Rule To, to optionally change the scope for fields in the Values area of a

    PivotTable report by:

    Selection, click Just these cells.

    Corresponding field, click All cells with the same fields.

    Value field, click All cells.

    5. Under Select a Rule Type, click Format only values that are above or below average.

    6. Under Edit the Rule Description, in the Format values that are list box, do one of the

    following:

  • Microsoft Office Excel 2007 Customized Material 41

    To format cells that are above or below the average for all of the cells in the range, select

    Above or Below.

    To format cells that are above or below one, two, or three standard deviations for all of the

    cells in the range, select a standard deviation.

    7. Optionally, change how the format is applied for fields in the Values area of a PivotTable report

    that are scoped by corresponding field.

    By default, the conditionally format is based on all visible values. However when you scope by

    corresponding field, instead of using all visible values, you can apply the conditional format for

    each combination of:

    A column and its parent row field, by selecting each Column group.

    A row and its parent column field, by selecting each Row group.

    8. Click Format to display the Format Cells dialog box.

    9. Select the number, font, border, or fill format that you want to apply when the cell value meets

    the condition, and then click OK.

    You can choose more than one format. The formats that you select are displayed in the Preview

    box.

  • Microsoft Office Excel 2007 Customized Material 42

    Format only unique or duplicate values

    NOTE You cannot conditionally format fields in the Values area of a PivotTable report by unique or

    duplicate values.

    Quick formatting

    1. Select one or more cells in a range, table, or PivotTable report.

    2. On the Home tab, in the Style group, click the arrow next to Conditional Formatting, and then

    click Highlight Cells Rules.

    3. Select Duplicate Values.

    4. Enter the values that you want to use, and then select a format.

    Advanced formatting

    1. Select one or more cells in a range, table, or PivotTable report.

    2. On the Home tab, in the Styles group, click the arrow next to Conditional Formatting, and then

    click Manage Rules.

    The Conditional Formatting Rules Manager dialog box is displayed.

    3. Do one of the following:

    To add a conditional format, click New Rule.

    The New Formatting Rule dialog box is displayed.

    To change a conditional format, do the following:

  • Microsoft Office Excel 2007 Customized Material 43

    a) Make sure that the appropriate worksheet or table is selected in the Show formatting

    rules for list box.

    b) Optionally, change the range of cells by clicking Collapse Dialog in the Applies

    to box to temporarily hide the dialog box, by selecting the new range of cells on the

    worksheet, and then by selecting Expand Dialog .

    c) Select the rule, and then click Edit rule.

    The Edit Formatting Rule dialog box is displayed.

    4. Under Select a Rule Type, click Format only unique or duplicate values.

    5. Under Edit the Rule Description, in the Format all list box, select unique or duplicate.

    6. Click Format to display the Format Cells dialog box.

    7. Select the number, font, border, or fill format that you want to apply when the cell value meets

    the condition, and then click OK.

    You can choose more than one format. The formats that you select are displayed in the Preview

    box.

  • Microsoft Office Excel 2007 Customized Material 44

    Find cells that have conditional formats

    If your worksheet has one or more cells with a conditional format, you can quickly locate them so that you

    can copy, change, or delete the conditional formats. You can use the Go To Special command to either

    find only cells with a specific conditional format or find all cells with conditional formats.

    Find all cells that have a conditional format

    1. Click any cell without a conditional format.

    2. On the Home tab, in the Editing group, click the arrow next to Find & Select, and then click

    Conditional Formatting.

    Find only cells with the same conditional format

    1. Click the cell that has the conditional format that you want to find.

    2. On the Home tab, in the Editing group, click the arrow next to Find & Select, and then click Go

    To Special.

    3. Click Conditional formats.

    4. Click Same under Data validation.

    Top of Page

  • Microsoft Office Excel 2007 Customized Material 45

    Clear conditional formats

    Do one of the following:

    Worksheet

    1. On the Home tab, in the Styles group, click the arrow next to Conditional Formatting,

    and then click Clear Rules.

    2. Click Entire Sheet.

    A range of cells, table, or PivotTable

    3. Select the range of cells, table, or PivotTable for which you want to clear conditional

    formats.

    4. On the Home tab, in the Styles group, click the arrow next to Conditional Formatting,

    and then click Clear Rules.

    Resources

    Conditional Formatting Step By Step

    Conditional Formatting Exercise

  • Microsoft Office Excel 2007 Customized Material 46

    Section 4

    Relative and Absolute Values

    1. Select the cell that contains the formula.

    2. In the formula bar (formula bar: A bar at the top of the Excel window that you use to enter or edit

    values or formulas in cells or charts. Displays the constant value or formula stored in the active

    cell.) , select the reference that you want to change.

    3. Press F4 to switch between the reference types.

    The following table summarizes how a reference type updates if a formula containing the

    reference is copied two cells down and two cells to the right.

    For a formula being copied: If the reference is:

    It changes to:

    $A$1 (absolute (absolute cell reference: In a formula, the exact address of a cell, regardless of the position of the cell that contains the formula. An absolute cell reference takes the form $A$1.) column and absolute row)

    $A$1

    A$1 (relative (relative reference: In a formula, the address of a cell based on the relative position of the cell that contains the formula and the cell referred to. If you copy the formula, the reference automatically adjusts. A relative reference takes the form A1.) column and absolute row)

    C$1

    $A1 (absolute column and relative row) $A3

    A1 (relative column and relative row) C3

    Resources

    Absolute Values Exercise

  • Microsoft Office Excel 2007 Customized Material 47

    Section 5

    Array Formula

    This section introduces array constants and explains how to enter, edit, and troubleshoot them.

    A brief introduction to array constants

    Array constants are a component of array formulas. You create array constants by entering a list of items

    and then manually surrounding the list with braces ({ }), like so:

    ={1,2,3,4,5}

    Earlier in this article, we emphasized the need to press CTRL+SHIFT+ENTER when you create array

    formulas. Because array constants are a component of array formulas, you surround the constants with

    braces manually by typing them. You then use CTRL+SHIFT+ENTER to enter the entire formula.

    If you delimit (separate) the items by using commas, you create a horizontal array (a row). If you delimit

    the items by using semicolons, you create a vertical array (a column). To create a two-dimensional array,

    you delimit the items in each row by using commas, and you delimit each row by using semicolons.

    As with array formulas, you can use array constants with any of the built-in functions that Excel provides.

    The following sections explain how to create each kind of constant and how to use these constants with

    functions in Excel.

  • Microsoft Office Excel 2007 Customized Material 48

    Create one-dimensional and two-dimensional constants

    The following procedure will give you some practice in creating horizontal, vertical, and two-dimensional

    constants.

    Create a horizontal constant

    1. Use the workbook from the previous column, or start a new workbook.

    2. Select cells A1 through E1.

    3. In the formula bar, enter the following formula, and then press CTRL+SHIFT+ENTER:

    ={1,2,3,4,5}

    NOTE In this case, you should type the opening and closing braces ({ }).

    You see the following result.

    You may wonder why you can't just type the numbers manually. Keep going, because the Use constants

    in formulas section, later in this article, demonstrates the advantages of using array constants.

    Create a vertical constant

    1. In your workbook, select a column of five cells.

    2. In the formula bar, enter the following formula and press CTRL+SHIFT+ENTER:

    ={1;2;3;4;5}

    You see the following result.

  • Microsoft Office Excel 2007 Customized Material 49

    Create a two-dimensional constant

    1. In your workbook, select a block of cells four columns wide by three rows high.

    2. In the formula bar, enter the following formula, and then press CTRL+SHIFT+ENTER:

    ={1,2,3,4;5,6,7,8;9,10,11,12}

    You see the following result:

    Use constants in formulas

    Now that you are familiar with entering array constants, here is a simple example that uses what we've

    discussed:

    1. Open a blank worksheet.

  • Microsoft Office Excel 2007 Customized Material 50

    2. Copy the following table starting at cell A1. Use the Paste Options button that appears

    nearby to match the destination formatting.

    3 4 5 6 7

    3. In cell A3, enter the following formula, and then press CTRL+SHIFT+ENTER:

    =SUM(A1:E1*{1,2,3,4,5})

    Notice that Excel surrounds the constant with another set of braces, because you entered it as an array

    formula.

    The value 85 appears in cell A3. The next section explains how the formula works.

  • Microsoft Office Excel 2007 Customized Material 51

    A look at the array constant syntax

    The formula you just used contains several parts.

    Function

    Stored array

    Operator

    Array constant

    The last element inside the parentheses is the array constant: {1,2,3,4,5}. Remember that Excel does not

    surround array constants with braces; you must do this. Also remember that after you add a constant to

    an array formula, you press CTRL+SHIFT+ENTER to enter the formula.

    Because Excel performs operations on expressions enclosed in parentheses first, the next two elements

    that come into play are the values stored in the workbook (A1:E1) and the operator. At this point, the

    formula multiplies the values in the stored array by the corresponding values in the constant. It's the

    equivalent of:

    =SUM(A1*1,B1*2,C1*3,D1*4,E1*5)

    Finally, the SUM function adds the values, and the sum 85 appears in cell A3:

    To avoid using the stored array and to just keep the operation entirely in memory, replace the stored

    array with another array constant:

    =SUM({3,4,5,6,7}*{1,2,3,4,5})

  • Microsoft Office Excel 2007 Customized Material 52

    To try this, copy the function, select a blank cell in your workbook, paste the formula into the formula bar,

    and then press CTRL+SHIFT+ENTER. You see the same result as you did in the earlier exercise that

    used the array formula =SUM(A1:E1*{1,2,3,4,5}).

    Elements that you can use in constants

    Array constants can contain numbers, text, logical values (such as TRUE and FALSE), and error values (

    such as #N/A). You can use numbers in the integer, decimal, and scientific formats. If you include text,

    you must surround that text with double quotation marks (").

    Array constants cannot contain additional arrays, formulas, or functions. In other words, they can contain

    only text or numbers that are separated by commas or semicolons. Excel displays a warning message

    when you enter a formula such as {1,2,A1:D4} or {1,2,SUM(Q2:Z8)}. Also, numeric values cannot contain

    percent signs, dollar signs, commas, or parentheses.

    Resources

    Array Formula Step By Step

    Array with IF Exercise

  • Microsoft Office Excel 2007 Customized Material 53

    Section 6

    Using NAMES

    A name is a meaningful shorthand that makes it easier to understand the purpose of a cell reference,

    constant, formula, or table, each of which may be difficult to comprehend at first glance. The following

    information shows common examples of names and how they can improve clarity and understanding.

    Example Type Example with no name Example with a name

    Reference =SUM(C20:C30) =SUM(FirstQuarterSales)

    Constant =PRODUCT(A5,8.3) =PRODUCT(Price,WASalesTax)

    Formula =SUM(VLOOKUP(A1,B1:F20,5,FALSE), -G5) =SUM(Inventory_Level,-Order_Amt)

    Table C4:G36 =TopSales06

    Types of names

    There are several types of names that you can create and use.

    Defined name A name that represents a cell, range of cells, formula, or constant value. You can create

    your own defined name, and Microsoft Office Excel sometimes creates a defined name for you, such as

    when you set a print area.

    Table name A name for an Excel table, which is a collection of data about a particular subject that is

    stored in records (rows) and fields (columns). Excel creates a default Excel table name of Table1, Table2,

    and so on, each time that you insert an Excel table, but you can change a table's name to make it more

    meaningful. For more information about Excel tables.

    The scope of a name

    All names have a scope, either to a specific worksheet (also called the local worksheet level) or to the

    entire workbook (also called the global workbook level). The scope of a name is the location within which

    the name is recognized without qualification. For example:

    If you have defined a name, such as Budget_FY08, and its scope is Sheet1, that name, if not

    qualified, is recognized only in Sheet1, but not in other sheets without qualification.

  • Microsoft Office Excel 2007 Customized Material 54

    To use a local worksheet name in another worksheet, you can qualify it by preceding it with the

    worksheet name, as the following example shows:

    Sheet1!Budget_FY08

    If you have defined a name, such as Sales_Dept_Goals, and its scope is the workbook, that

    name is recognized for all worksheets in that workbook, but not for any other workbook.

    A name must always be unique within its scope. Excel prevents you from defining a name that is not

    unique within its scope. However you can use the same name in different scopes. For example, you can

    define a name, such as GrossProfit that is scoped to Sheet1, Sheet2, and Sheet3 in the same workbook.

    Although each name is the same, each name is unique within its scope. You might do this to ensure that

    a formula that uses the name, GrossProfit, is always referencing the same cells at the local worksheet

    level.

    You can even define the same name, GrossProfit, for the global workbook level, but again the scope is

    unique. In this case, however, there can be a name conflict. To resolve this conflict, by default Excel uses

    the name that is defined for the worksheet because the local worksheet level takes precedence over the

    global workbook level. If you want to override the precedence and you want to use the workbook name,

    you can disambiguate the name by prefixing the workbook name as the following example shows:

    WorkbookFile!GrossProfit

    You can override the local worksheet level for all worksheets in the workbook, with the exception of the

    first worksheet, which always uses the local name if there is a name conflict and cannot be overridden.

    Defining and entering names

    You define a name by using the:

    Name box on the formula bar This is best used for creating a workbook level name for a

    selected range.

    Create a name from selection You can conveniently create names from existing row and

    column labels by using a selection of cells in the worksheet.

  • Microsoft Office Excel 2007 Customized Material 55

    New Name dialog box This is best used for when you want more flexibility in creating names,

    such as specifying a local worksheet level scope or creating a name comment.

    NOTE By default, names use absolute cell references.

    You can enter a name by:

    Typing Typing the name, for example, as an argument to a formula.

    Using Formula AutoComplete Use the Formula AutoComplete drop-down list, where valid

    names are automatically listed for you.

    Selecting from the Use in Formula command Select a defined name from a list available from

    the Use in Formula command in the Defined Names group on the Formulas tab.

    Auditing names

    You can also create a list of defined names in a workbook. Locate an area with two empty columns on the

    worksheet (the list will contain two columns, one for the name and one for a description of the name).

    Select a cell that will be the upper-left corner of the list. On the Formulas tab, in the Defined Names

    group, click Use in Formula, click Paste and then, in the Paste Names dialog box, click Paste List.

    Learn about syntax rules for names

    The following is a list of syntax rules that you need to be aware of when you create and edit names.

    Valid characters The first character of a name must be a letter, an underscore character (_), or

    a backslash (\). Remaining characters in the name can be letters, numbers, periods, and

    underscore characters.

    NOTE You cannot use the uppercase and lowercase characters "C", "c", "R", or "r" as a

    defined name, because they are all used as a shorthand for selecting a row or column for the

    currently selected cell when you enter them in a Name or Go To text box.

    Cell references disallowed Names cannot be the same as a cell reference, such as Z$100 or

    R1C1.

  • Microsoft Office Excel 2007 Customized Material 56

    Spaces are not valid Spaces are not allowed as part of a name. Use the underscore character

    (_) and period (.) as word separators, such as, Sales_Tax or First.Quarter.

    Name length A name can contain up to 255 characters.

    Case sensitivity Names can contain uppercase and lowercase letters. Excel does not

    distinguish between uppercase and lowercase characters in names. For example, if you created

    the name Sales and then create another name called SALES in the same workbook, Excel

    prompts you to choose a unique name.

    Define a name for a cell or cell range on a worksheet

    1. Select the cell, range of cells, or nonadjacent selections that you want to name.

    2. Click the Name box at the left end of the formula bar.

    Name box

    3. Type the name that you want to use to refer to your selection. Names can be up to 255

    characters in length.

    4. Press ENTER.

    NOTE You cannot name a cell while you are changing the contents of the cell.

  • Microsoft Office Excel 2007 Customized Material 57

    Define a name by using a selection of cells in the worksheet

    You can convert existing row and column labels to names.

    1. Select the range that you want to name, including the row or column labels.

    2. On the Formulas tab, in the Defined Names group, click Create from Selection.

    3. In the Create Names from Selection dialog box, designate the location that contains the labels

    by selecting the Top row, Left column, Bottom row, or Right column check box.

    NOTE A name created by using this procedure refers only to the cells that contain values and does not

    include the existing row and column labels.

  • Microsoft Office Excel 2007 Customized Material 58

    Define a name by using the New Name dialog box

    1. On the Formulas tab, in the Defined Names group, click Define Name.

    2. In the New Name dialog box, in the Name box, type the name that you want to use for your

    reference.

    NOTE Names can be up to 255 characters in length.

    3. To specify the scope of the name, in the Scope drop-down list box, select Workbook or the

    name of a worksheet in the workbook.

    4. Optionally, in the Comment box, enter a descriptive comment up to 255 characters.

    NOTE If you save the workbook to Microsoft Office SharePoint Server 2007 Excel Services,

    and you specify one or more parameters, the comment is used as a ScreenTip in the

    Parameters Task Pane.

    5. In the Refers to box, do one of the following:

    To enter a cell reference, type the cell reference.

    TIP The current selection is entered by default. To enter other cell references as an

    argument, click Collapse Dialog (which temporarily shrinks the dialog box), select the

    cells on the worksheet, and then click Expand Dialog .

    To enter a constant, type = (equal sign) and then type the constant value.

    To enter a formula, type = and then type the formula.

    6. To finish and return to the worksheet, click OK.

    TIP To make the New Name dialog box wider or longer, click and drag the grip handle at the bottom.

  • Microsoft Office Excel 2007 Customized Material 59

    Manage names by using the Name Manager Dialog box

    Use the Name Manager dialog box to work with all of the defined names and table names in the

    workbook. For example, you may want to find names with errors, confirm the value and reference of a

    name, view or edit descriptive comments, or determine the scope. You can also sort and filter the list of

    names, and easily add, change, or delete names from one location.

    To open the Name Manager dialog box, on the Formulas tab, in the Defined Names group, click Name

    Manager.

    View names

    The Name Manager dialog box displays the following information about each name in a list box:

    This Column: Displays:

    Icon and Name

    One of the following:

    A defined name, which is indicated by a defined name icon.

    A table name, which is indicated by a table name icon.

    Value The current value of the name, such as the results of a formula, a string constant, a cell range, an error, an array of values, or a placeholder if the formula cannot be evaluated. The following are representative examples:

    "this is my string constant"

    3.1459

    {2003;12,2002;23,;2001,18}

    #REF!

    {...}

    Refers To The current reference for the name. The following are representative examples:

    =Sheet1!$A$3

  • Microsoft Office Excel 2007 Customized Material 60

    =8.3

    =HR!$A$1:$Z$345

    =SUM(Sheet1!A1,Sheet2!B2)

    Scope A worksheet name, if the scope is the local worksheet

    level.

    "Workbook", if the scope is the global worksheet level.

    Comment Additional information about the name up to 255 characters. The following are representative examples:

    This value will expire on May 2, 2007.

    Don't delete! Critical name!

    Based on the ISO certification exam numbers.

    NOTE If you save the workbook to Microsoft Office SharePoint Server 2007 Excel Services, and you

    specify one or more parameters, the comment is used as a ScreenTip in the Parameters Task Pane.

    NOTES

    You cannot use the Name Manager dialog box while you are changing the contents of the cell.

    The Name Manager dialog box does not display names defined in Visual Basic for Applications

    (VBA), or hidden names (the Visible property of the name is set to "False").

    Resize columns

    To automatically size the column to fit the largest value in that column, double-click the right side

    of the column header.

    Sort names

    To sort the list of names in ascending or descending order, alternately click the column header.

  • Microsoft Office Excel 2007 Customized Material 61

    Filter names

    Use the commands in the Filter drop-down list to quickly display a subset of names. Selecting each

    command toggles the filter operation on or off, which makes it easy to combine or remove different filter

    operations to get the results that you want.

    To filter the list of names, do one or more of the following:

    Select: To:

    Names Scoped To Worksheet

    Display only those names that are local to a worksheet.

    Names Scoped To Workbook

    Display only those names that are global to a workbook.

    Names With Errors Display only those names with values that contain errors (such as #REF, #VALUE, or #NAME).

    Names Without Errors Display only those names with values that do not contain errors.

    Defined Names Display only names defined by you or by Excel, such as a print area.

    Table Names Display only table names.

    Change a name

    If you change a defined name or table name, all uses of that name in the workbook are also changed.

    1. On the Formulas tab, in the Defined Names group, click Name Manager.

    2. In the Name Manager dialog box, click the name that you want to change, and then click Edit.

    TIP You can also double-click the name.

    3. In the Edit Name dialog box, in the Name box, type the new name for the reference.

    4. In the Refers to box, change the reference , and then click OK.

    5. In the Name Manager dialog box, in the Refers to box, change the cell, formula, or constant

    represented by the name.

  • Microsoft Office Excel 2007 Customized Material 62

    To cancel unwanted or accidental changes, click Cancel , or press ESC.

    To save changes, click Commit , or press ENTER.

    NOTE The Close button only closes the Name Manager dialog box. It is not required to commit

    changes that have already been made.

    Delete one or more names

    1. On the Formulas tab, in the Defined Names group, click Name Manager.

    2. In the Name Manager dialog box, click the name that you want to change.

    3. Select one or more names by doing one of the following:

    To select a name, click it.

    To select more than one name in a contiguous group, click and drag the names, or press

    SHIFT and click the mouse button for each name in the group.

    To select more than one name in a noncontiguous group, press CTRL and click the mouse

    button for each name in the group.

    4. Click Delete. You can also press DELETE.

    5. Click OK to confirm the deletion.

    NOTE The Close button only closes the Name Manager dialog box. It is not required to commit

    changes that have already been made

    Resources

    Name Step By Step

    Name Exercise

    Edited Name Exercise

    Using Name in Function Exercise

    Delete Name Exercise

    General Exercise

  • Microsoft Office Excel 2007 Customized Material 63

    Section 7

    TABLE

    When you create a table (previously known as list) in a Microsoft Office Excel worksheet (worksheet: The

    primary document that you use in Excel to store and work with data. Also called a spreadsheet. A

    worksheet consists of cells that are organized into columns and rows; a worksheet is always stored in a

    workbook.), you can manage and analyze the data in that table independently of data outside the table.

    For example, you can filter table columns, add a row for totals, apply table formatting, and publish a table

    to a server that is running Windows SharePoint Services 3.0.

    If you do not want to work with your data in a table, you can convert the table to a regular range while

    keeping any table style formatting that you applied. When you no longer need a table, you can delete it.

    NOTE Excel tables should not be confused with the data tables (data table: A range of cells that shows

    the results of substituting different values in one or more formulas. There are two types of data tables:

    one-input tables and two-input tables.) that are part of a suite of what-if analysis commands.

  • Microsoft Office Excel 2007 Customized Material 64

    Create a table

    You can use one of two ways to create a table. You can either insert a table in the default table style or

    you can format your data as a table in a style that you choose.

    Insert a table

    1. On a worksheet, select the range of cells that you want to include in the table. The cells can be

    empty or can contain data.

    2. On the Insert tab, in the Tables group, click Table.

    Keyboard shortcut You can also press CTRL+L or CTRL+T.

    3. If the selected range contains data that you want to display as table headers, select the My table

    has headers check box.

    Table headers display default names if you do not select the My table has headers check box.

    You can change the default names by typing the text that you want.

    NOTE If you do not want to display table headers, you can turn them off later. For more

    information about how to turn table headers off.

    Tips

    After you create a table, the Table Tools become available, and a Design tab is displayed. You

    can use the tools on the Design tab to customize or edit the table.

    Unlike lists in Office Excel 2003, a table does not have a special row (marked with *) for quickly

    adding new rows. For more information about how to add or insert rows in a table.

  • Microsoft Office Excel 2007 Customized Material 65

    Format data as a table

    1. On the worksheet, select a range of empty cells or cells that contain the data that you want to

    quickly format as a table.

    2. On the Home tab, in the Styles group, click Format as Table.

    NOTE When you use Format as Table, Office Excel automatically inserts a table.

    3. Under Light, Medium, or Dark, click the table style that you want to use.

    NOTE Custom table styles are available under Custom after you create one or more of them.

    For information about how to create a custom table style.

    Tips

    After you create a table, the Table Tools become available, and a Design tab is displayed. You

    can use the tools on the Design tab to customize or edit the table.

    Unlike lists in Office Excel 2003, a table does not have a special row (marked with *) for quickly

    adding new rows. For more information about how to add or insert rows in a table,

    Convert a table to a range of data

    1. Click anywhere in the table.

    TIP This displays the Table Tools, adding the Design tab.

    2. On the Design tab, in the Tools group, click Convert to Range.

  • Microsoft Office Excel 2007 Customized Material 66

    NOTE Table features are no longer available after you convert the table back to a range. For

    example, the row headers no longer include the sort and filter arrows, and structured references

    (references that use table names) that were used in formulas turn into regular cell references.

    Tips

    You can also right-click the table, point to Table, and then click Convert to Range.

    Immediately after you create a table, you can also click Undo on the Quick Access Toolbar

    to convert that table back to a range.

    Delete a table

    1. On a worksheet, select a table.

    2. Press DELETE.

    TIP You can also click Undo on the Quick Access Toolbar to delete a table that you just created.

    Resources

    Filter Step By Step

    Table Step By Step

    Table Exercise

  • Microsoft Office Excel 2007 Customized Material 67

    Section 8

    Advanced Filter

    The Advanced command works differently from the Filter command in several important ways.

    It displays the Advanced Filter dialog box instead of the AutoFilter menu.

    You type the advanced criteria in a separate criteria range on the worksheet and above the

    range of cells or table you want to filter. Microsoft Office Excel uses the separate criteria range in

    the Advanced Filter dialog box as the source for the advanced criteria.

    Example: Criteria range (A1:C4) and list range (A6:C10) used for the following

    procedures

    The example may be easier to understand if you copy it to a blank worksheet.

    1. Create a blank workbook or worksheet.

    2. Select the example in the Help topic.

    NOTE Do not select the row or column headers.

    Selecting an example from Help

  • Microsoft Office Excel 2007 Customized Material 68

    3. Press CTRL+C.

    4. In the worksheet, select cell A1, and press CTRL+V.

    5. To switch between viewing the results and viewing the formulas that return the results,

    press CTRL+` (grave accent), or on the Formulas tab, in the Formula Auditing group,

    click the Show Formulas button.

    1

    2

    3

    4

    5

    6

    7

    8

    9

    10

    A B C

    Type Salesperson Sales

    Type Salesperson Sales

    Beverages Suyama $5122

    Meat Davolio $450

    produce Buchanan $6328

    Produce Davolio $6544

    Comparison operators

    You can compare two values with the following operators. When two values are compared by using these

    operators, the result is a logical value either TRUE or FALSE.

    Comparison operator Meaning Example

    = (equal sign) Equal to A1=B1

    > (greater than sign) Greater than A1>B1

    < (less than sign) Less than A1= (greater than or equal to sign) Greater than or equal to A1>=B1

  • Microsoft Office Excel 2007 Customized Material 69

    Using the equal sign to type text or a value

    Because the equal sign (=) is used to indicate a formula when you type text or a value in a cell, Excel

    evalu