Presentation is loading. Please wait.

Presentation is loading. Please wait.

CONDITIONAL FORMATTING AND CUSTOM NUMBER FORMATS LEC 5 1.

Similar presentations


Presentation on theme: "CONDITIONAL FORMATTING AND CUSTOM NUMBER FORMATS LEC 5 1."— Presentation transcript:

1 CONDITIONAL FORMATTING AND CUSTOM NUMBER FORMATS LEC 5 1

2 ABOUT CONDITIONAL FORMATTING Example: Select cells A2 through A7. Do this by dragging from A2 to A7. Then, click Home > Conditional Formatting > New Rule. In the New Formatting Rule dialog box, click Use a formula to determine cells 2 Click Format. In the Color box, select Red. In the Font Style box, select Bold. Click OK until the dialog boxes are closed.

3 FORMATTING TYPES YOU CAN APPLY When you select a conditional formatting rule, Excel displays a dialog box specific to that rule. These dialog boxes have one thing in a common: a drop-down list with common formatting suggestions 3

4 4 THE DIALOG BOX THAT APPEARS WHEN YOU CHOOSE This particular rule applies the formatting if the value in the cell falls between two specified values.

5 MAKING YOUR OWN RULES For do-it-yourself types, Excel provides the New Formatting Rule dialog box, Access this dialog box by choosing Home ➪ Styles ➪ Conditional Formatting ➪ New Rules. 5 New Rules

6 Here is a summary of the rule types: Format all cells based on their values: Use this rule type to create rules that display data bars, color scales, or icon sets. Format only cells that contain: Use this rule type to create rules that format cells based on mathematical comparisons (greater than, less than, greater than or equal to, less than or equal to, equal to, not equal to, between, not between). Format only top or bottom ranked values: Use this rule type to create rules that involve identifying cells in the top n, top n percent, bottom n, and bottom n percent. MAKING YOUR OWN RULES 6

7  Format only values that are above or below average: Use this rule type to create rules that identify cells that are above average, below average, or within a specified standard deviation from the average.  Format only unique or duplicate values: Use this rule type to create rules that format unique or duplicate values in a range.  Use a formula to determine which cells to format: Use this rule type to create rules based on a logical formula. 7

8 CONDITIONAL FORMATS THAT USE GRAPHICS This section describes the three conditional formatting options that display graphics: data bars, color scales, and icons sets. These types of conditional formatting can be useful for visualizing the values in a range. Using data bars The data bars conditional format displays horizontal bars directly in the cell. The length of the bar is based on the value of the cell, relative to the other values in the range. 8

9 CONDITIONAL FORMATS THAT USE GRAPHICS Excel provides quick access to 12 data bar styles via Home ➪ Styles ➪ Conditional Formatting ➪ Data Bars. For additional choices, click the More Rules option, which displays the New Formatting Rule dialog box. Use this dialog box to  Show the bar only (hide the numbers).  Specify Minimum and Maximum values for the scaling.  Change the appearance of the bars.  Specify how negative values and the axis is handled.  Specify the direction of the bars. 9

10 CONDITIONAL FORMATS THAT USE GRAPHICS Using color scales The color scale conditional formatting option varies the background color of a cell based on the cell’s value, relative to other cells in the range. 10

11 CONDITIONAL FORMATS THAT USE GRAPHICS Using icon sets Yet another conditional formatting option is to display an icon in the cell. The icon displayed depends on the value of the cell. select the cells and choose Home ➪ Styles ➪ Conditional Formatting ➪ Icon Sets. Excel provides 20 icon sets to choose from. The number of icons in the sets ranges from three to five. You cannot supply your own icons. 11

12 CREATING FORMULA-BASED RULES Excel’s conditional formatting feature is versatile, but sometimes it’s just not quite versatile enough. Fortunately, you can extend its versatility by writing conditional formatting formulas 12

13 UNDERSTANDING RELATIVE AND ABSOLUTE REFERENCES If the formula that you enter into the Conditional Formatting dialog box contains a cell reference, that reference is considered a relative reference, based on the upper-left cell in the selected range. For example, suppose that you want to set up a conditional formatting condition that applies shading to cells in range A1:B10 only if the cell contains text. None of Excel’s conditional formatting options can do this task, so you need to create a formula that will return TRUE if the cell contains text and FALSE otherwise. 13

14 UNDERSTANDING RELATIVE AND ABSOLUTE REFERENCES Follow these steps: 1. Select the range A1:B10 and ensure that cell A1 is the active cell. 2. Choose Home ➪ Styles ➪ Conditional Formatting ➪ New Rule to display the New Formatting Rule dialog box. 3. Click the Use a Formula to Determine Which Cells to Format rule type. 4. Enter the following formula in the Formula box: =ISTEXT(A1) 5. Click the Format button to display the Format Cells dialog box. 6. From the Fill tab, specify the cell shading that will be applied if the formula returns TRUE. 7. Click OK to return to the New Formatting Rule dialog box 8. In the New Formatting Rule dialog box, click the Preview button. Make sure that the formula is working correctly and to see a preview of your selected formatting. 9. If the preview looks correct, click OK to close the New Formatting Rule dialog box. Notice that the formula entered in Step 4 contains a relative reference to the upper-left cell in the selected range. 14

15 WORKING WITH CONDITIONAL FORMATS Managing rules The Conditional Formatting Rules Manager dialog box is useful for checking, editing, deleting, and adding conditional formats. First select any cell in the range that contains conditional formatting. 15 Home ➪ Styles ➪ Conditional Formatting ➪ Manage Rules.

16 COPYING CELLS THAT CONTAIN CONDITIONAL FORMATTING Conditional formatting information is stored with a cell much like standard formatting information is stored with a cell. As a result, when you copy a cell that contains conditional formatting, you also copy the conditional formatting. If you insert rows or columns within a range that contains conditional formatting, the new cells have the same conditional formatting. 16

17 DELETING CONDITIONAL FORMATTING To remove all conditional formats (as well as all other cell formatting), select the cell. Then choose Home ➪ Editing ➪ Clear ➪ Clear Formats. Or, choose Home ➪ Editing ➪ Clear ➪ Clear All to delete the cell contents and the conditional formatting. To remove only conditional formatting (and leave the other formatting intact), use Home ➪ Styles ➪.Conditional Formatting ➪ Clear Rules 17

18 can use the Go To dialog box to select cells that contains conditional formatting 18 Locating cells that contain conditional formatting Choose Home ➪ Editing ➪ Find & Select ➪ Go To Special

19 19 2. In the Go To Special dialog box, select the Conditional Formats option. 3. To select all cells on the worksheet containing conditional formatting, select the All option; to select only the cells that contain the same conditional formatting as the active cell, select the Same option. 4. Click OK. Excel selects the cells for you

20 USING CUSTOM NUMBER FORMATS About Number Formatting By default, all cells use the General number format. Automatic number formatting Excel is smart enough to perform some formatting for you automatically. 20

21 USING CUSTOM NUMBER FORMATS Excel automatically applies a built-in number format to a cell based on the following criteria:  If a number contains a slash (/), it may be converted to a date format or a fraction format.  If a number contains a hyphen (-), it may be converted to a date format.  If a number contains a colon (:) or is followed by a space and the letter A or P, it may be converted to a time format.  If a number contains the letter E (uppercase or lowercase), it may be converted to scienti ficnotation or exponential format. 21

22 FORMATTING NUMBERS BY USING THE RIBBON The Number group on the Home tab of the Ribbon contains several controls for applying common number formats quickly. The Number Format drop-down control gives you quick access to 11 common number formats. In addition, the Number group contains some buttons. When you click one of these buttons, the selected cells take on the specified number format. 22

23 NUMBER-FORMATTING BUTTONS ON THE RIBBON 23

24 NUMBER-FORMATTING KEYBOARD SHORTCUTS 24

25 USING THE FORMAT CELLS DIALOG BOX TO FORMAT NUMBERS For maximum control of number formatting, use the Number tab in the Format Cells dialog box. You can access this dialog box in any of several ways: Click the dialog box launcher at the bottom right of the Home ➪ Number group. Choose Home ➪ Number ➪ Number Format ➪ More Number Formats. Press Ctrl+1. 25

26 USING THE FORMAT CELLS DIALOG BOX TO FORMAT NUMBERS The Number tab in the Format Cells dialog box contains 12 categories of number formats from which to choose. When you select a category from the list box, the right side of the dialog box changes to display appropriate options. Here are the number-format categories, along with some general comments: General Number Currency Accounting Date Time Percentage Fraction Scientific Text Special Custom 26

27 CREATING A CUSTOM NUMBER FORMAT When you create a custom number format, it can be used to format any cells in the workbook. You can create as many custom number formats as you need. 27

28 CUSTOM NUMBER FORMAT CODES 28

29 29


Download ppt "CONDITIONAL FORMATTING AND CUSTOM NUMBER FORMATS LEC 5 1."

Similar presentations


Ads by Google