0% found this document useful (0 votes)
29 views

Conditional Formatting

Notes for Conditional Formatting

Uploaded by

Aybe Marcelo
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
29 views

Conditional Formatting

Notes for Conditional Formatting

Uploaded by

Aybe Marcelo
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 21
3.3 Conditional Formatting Teese + Use Conditional Formatting techniques to provide flexible highlighting, applying specified for- matting only when certain conditions are met. Techniques include: * Data bars — to make it easy to visualize values in a range of cells. * Cells Rules — to highlight values that match the requirements you specify You now have all the calculations you need in your CAS 170 Grades spreadsheet. There is a lot of data here, To make it easier to pick out the most important pieces of data, Excel provides Con- ditional Formatting. The best thing about Conditional Formatting is that it is flexible, applying specified formatting only when certain conditions are met. 1. Select the values in the Total Points column (05:024). 2. At the bottom of your selection, click on the Quick Analysis Tool, On the Formatting tab, select Data Bars (see Figure 3.18). (G Mac Users: as stated previously, there is no Quick Analysis Tool for Excel for Mac. Use the alternate steps as shown below. Excel places blue bars on top of your values; long blue bars for larger numbers, shorter ones for smaller numbers. This makes it easier to see how well each student did in the class - without hav- ing to look at the specific numbers. BEGINNING EXCEL 2019 12 Figure 3.18 Data Bars on the Quick Analysis tool Another way to apply Data Bars is to: + Select the range that needs data bars + On the Home tab, in the Styles group, select Data Bars from the Conditional Formatting tool. + From there you can select data bars of different colors and opacities (see Figure 3.19). G Mac users: Alternate Steps: + On the Home tab select Data Bars from the Conditional Formatting tool." + From there you can select data bars of different colors and opacities (see Figure 3.19). us DIANE SHINGLEDECKER Figure 3.19 Data Bars on the Conditional Formatting tool Itis even more important to highlight the students who are failing in the class. To practice further with Conditional Formatting we will do that in two places, in the Percentages column and on the Letter Grade column. To start with, we want any F letter grades to be formatted with a light red fill color and dark red text. 1. Select the Letter Grades (R5:R24), 2. On the Home tab, in the Styles group, select Highlight Cell Rules from the Conditional Formatting tool (see Figure 3.20). 3. Select Equal To 4, Fill out the Equal to dialog box so that cells that are equal to: F have Light Red Fill with Dark Red Text (see Figure 3.21). BEGINNING EXCEL 2019 14 terest ee Ba Be Figure 3.20 Conditional Formatting Equal To Test CHA CHS CHO Test2 CH7 CHE CHO Test? Exam Points Percentage Pass/Fail #10 9 7 SO 10 10 10 47 142 N65 ass 3808 7 7 36 8 8 8 39 113 es 76% Pass, 3 6 5 0 3 0 0 0 0 OM am 26% Fal 50.9 8 9 48 8 8 9 45 100, 92% Pass. 9 10 9 10 43 9 9 8 40 129 ss pass x1 5 9 4 5 5 9 33 115 Ab 2 9 8 6 33:10 5 0 > 99 E70 ww 7 R 0 7 7 0 2 150 4 1 8 7 46 10 10 9 43 130 NN pass % 6 5 4 2 6 6 5 2 73MM 26 535 Fall 4 = 3 Equal To. (Format cll thet ae EQUAL TO: a 4 i) wah gt Ret wih Da Re Text |] | | cancel xe 8 6 6 066 O38 116 M728 Pace 49 8 10 10 49 10 10 8 45 141 95% Pass Figure 3.21 Conditional Formatting Equal To Dialog Box Let's try that one more time = to highlight those students who are passing the class. This time we will use the Pass/Fail text in the Pass/Fail column. If the text for a student is Pass we want the cell to be formatted with a yellow fill with dark yellow text. 1. Select the Pass/Fail grades (Q5:Q24). 185 DIANE SHINGLEDECKER On the Home tab, in the Styles group, select Highlight Cell Rules from the Conditional Formatting tool (see Figure 3.20). Select Equal To Fill out the Equal to dialog box so that cells that are equal to: Pass have Yellow Fill with Dark Yellow Text. (To find the Yellow Fill with Dark Yellow text option, click the the down arrow at the end of the last (with) box). You do not have to use the default styles to make your data stand out. You can set any formatting you want. When you do, itis probably a good idea to include other styling in addition to color. Your spreadsheet might be printed in black and white. You would hate to lose your Conditional format- ting. Now we are going to use conditional formatting to display any Percentages that are less than 60% with red text formatted in bold and italic. 1 2. Select the Percentage grades (P5:P24). On the Home tab, in the Styles group, select Highlight Cell Rules from the Conditional Formatting tool (see Figure 3.20). Select Less Than Fill out the Less Than dialog box so that cells that are less than .6 will be have conditional formatting. But, instead of using the default red text on a light red fill, press the down arrow at the end of that box and select Custom Format. On the Font tab of the Format Cells dialog box, in the Font style box, select Bold Italic. In the Color box, select Red (see Figure 3.22) Press OK. Then press OK again. BEGINNING EXCEL 2019 Format Cells sumbee | Fat | order |i a ? Tega & _— cee cour | nv sinktieough | Aapbeeryze For CnaondlFomating you can Sie Undrine Coy, and Stato oe a cancel Figure 3.22 Conditional Formatting Custom Format Cells Dialog box ‘a8 Conditional Formatting is valuable in that it reflects the current data. It changes to reflect changes in the data, To test this, delete DeShea's final exam score. (Select NS. Press Delete on your key- board.) Suddenly, DeShae is failing the course and the Conditional Formatting reflects that. This is a little unfair to DeShae - who has worked so hard this quarter. Let's give him back his grade. Press CTRL Z (Undo). His test score reappears and the Conditional formatting reflects that as well, MAKING CHANGES What if you have made a mistake with your Conditional Formatting? Or, you want to delete it alto- gether? You can use the Conditional Formatting Manage Rules tool. in our example, we want to remove the conditional formatting rule that formats the Pass text with yellow. We are also going to modify the minimum passing percentage for the conditional formatting rule that is applied to the percentages. 1. On the Home Tab, in the Styles Group, select Manage Rules at the very bottom of the Conditional Formatting drop-down list. 2. Show formatting rules for: This Worksheet (see Figure 3.23), 3. We don't really need to highlight the students who are passing the class, so select that Ww DIANE SHINGLEDECKER rule in the Rules Manager and press the Delete Rule button. Mac Users should click the minus symbol - at bottom left corner to delete the rule. Concitional Formatting Rules Manager Showformatting ules for fi WoaRinesl TN Elnewute.. | | E@gatRute.. | | Xpeteteruie | fi) |v Rule (opplied in order shown) Format ‘Appliesto Stop if True CellVolue < 06 AabbCc¥ zz ~SPSS:SP524 cellvave=-tass) —AMBBCHYZE —=sa5ss0see abiceiyae | =snsssnsze =S0s5:50824 Figure 3.23 Conditional Formatting Manage Rules In a previous exercise (the IF function), we decided that students were failing if they got a percentage score of less than 70%, so the Conditional Formatting rule in the Percentage column needs repair. 4, Select the rule that reads Cell Value <0.6. 5. Select the Edit Rule button, and change the .6 to .7 (see Figure 3.24). 6. Click OK (or Apply) twice. Double check that your completed workbook matches Figure 3.25. BEGINNING EXCEL 2019 Edit Formatting Rule Perey Sle ue Typ [= Format at cels based on ei aes Format xy als hat cin ermat ny op er beter area ats roma ny oth a oboe or bdow vege = Femat ny wie or duet aves a Figure 3.24 Conditional Formatting Edit Formatting Rule Dialog box Change the criteria to 7 1 (AS 170 Grades 2 Wednesday, September 28, 2016 Foal Tota ter 4 suudentName 4 218 Test 1 CH O15 CE Test? CHT GHB HY Text8 Exam _Polnts_Percetage Pan/fail ode S[ inden, desea 10 40 10 a8 197 S| cep | Cally Aber a7 8 8 8 7 7 3 8 8 83 MMs rekon 7 Denton Edward «#88 SO OOM een 2) Dine 5 8 9 0 $ 8 8m 8 8 5 5s MM cmos o GahMenta «09 8 98 8 9 9 8 . © Guytmanel «Stas wk SS « Ni, Tamar 90 £ 2 $ 8 6 m0 5 0 x Soko ° 2 Manual 0 7 7 @ 0 7 § 9 7 70 07 50h a 3 Mahara Ciuds «10 «30-6 0 87 we Ok © t4| Pema nes Doe 8 wm 8 ew 8 8 8 eR fs Popov. les 90 8 7 $70 oo os ss * | Poa oes 755 0 7 5 7 0 55 6 2 cells ' 3 Ale, edn 0 3 5 # 9 6 9 8 39 5 5 1. » 3) Sra, Yr 9 8 9 a $ s 9 4 9 9 8 a sk . © Scion Yogor = «swe 07 tk * 2 Tan Oung 3 8 @ 9 9 8 8 9 9 0 4 57 Ae 2 Toyer ius == ws wo 7 fe a 2 5% 7 0 0 7 3 0 0 6 2» iM: owen 2 a 6 6 ®t 6 6m 6 6 0 MM oes » soo 6 2 0 0 oo wo 8 6 caus 27 Leer Grades 2» Ome = emo 2 cuts | 18 Figure 3.25 Completed Ch3 Gradebook 19 DIANE SHINGLEDECKER SETTING THE PRINT AREA Before you consider this workbook finished, you need to prepare it for printing. The first thing you will do is set the Print Area so that the table of Letter Grades in A27:B32 does not print. 1. Select A1:R25, This is the only part of the worksheet that you want to have print. 2. On the Page Layout ribbon, click the Print Area button. Choose Set Print Area from the menu. Next you will preview the worksheet in Print Preview to check that the print area setting worked, as well as make sure its printing on one page. 1. View the workbook in Print Preview. 6 Mac users should choose Print from the File menu to view Print Preview. 2. Set the page orientation to Landscape. 3. Change the page scaling if needed so that the entire worksheet prints on one page. 4. Save the CH3 Gradebook and Parks workbook. ATTRIBUTION 3.3 Conditional Formatting by Noreen Brown, Mary Schatz, and Art Schneider, Portland Commu- nity College, is licensed under CC BY 4.0 3.4 Preparing to Print Teese + Locate and fix formatting consistency errors. + Apply new formatting techniques. + Use Print Titles to repeat rows and columns on each page of a multiple page worksheet. + Control where page breaks occur in a multiple page worksheet. In this section, we will review a worksheet for formatting consistency, as well as learn two new formatting techniques. This worksheet currently prints on four pages, so we will learn new page setup options to control how these pages print. A new data file will be used for this section REVIEWING FORMATTING FOR CONSISTENCY Open the “CH3-Gradebook and Parks” workbook if it isn't already open Click on the “Park Size"sheet tab within your *CH3-Gradebook and Parks” workbook You have been given a spreadsheet with data about the national parks in the western United States. Your coworker formatted the workbook and has asked you to review it for consistency. You also need to prepare it for printing. Figure 3.26 shows how the second page of the finished work- sheet will appear in Print Preview. 11 DIANE SHINGLEDECKER shits National Parks of the Western States [tck canyon of the Gunnison Watonal Prk leat end Ounes Natonal Par and Preserve [esa verde National Park aesoverde Inocky Mountala National Park ses Figure 3.26 Completed National Parks worksheet REVIEWING FORMATTING FOR INCONSISTENCIES The first thing you are going to do is review the worksheet for formatting inconsistencies. 1. Scroll through the worksheet and locate the following formatting errors: » The formatting of the Utah label does not match the other states. * The Year Established values for Hawaii are not center aligned like the other years. » The cells for the Nevada data should have the same green fill color as the other alternating states. * The number of digits after the decimal place for the Size values is inconsistent. Also, these values should be formatted with Comma style to make them easier to read. BEGINNING EXCEL 2019 1 2. To fix these errors, complete the following steps: + Merge & Center A34:A38. Change the font size to 16 and apply Bold format. + Center align C28:C29. * Apply the green fill color to A31:£31 (be sure to match the green fill color of the other states). * Select €4:43 and apply Cornma Style. Use Increase Decimal and/or Decrease Decimal until one digit appears after the decimal place for all values. 3. While you're fixing errors, proofread the sheet and correct any typos. 4, Finally, let's add color to the two sheet tabs. The use of colored tabs assists in navigating between sheet tabs. »- Right-click the “Park Size” sheet tab (@6 Mac users hold down Ctrl key and click the sheet tab) * Point to Tab Color and choose a “blue” color. * Now right-click the “Grades” sheet tab, point to Tab Color and choose an “orange” color. That's it! FINE-TUNING FORMATTING Now that you have fixed the inconsistencies in the formatting, you decide to apply some format= ting techniques to make the worksheet look even better. You are going to start by vertically align- ing the names of the states within the cells. 1. Select A4:A43 (the cells with the state labels). 2. Click the Home tab on the ribbon. 3. In the Alignment group, click the Middle Align button (see Figure 3.26). Notice that the nares of the states are now centered between the top and bottom borders of the cells. alignment s Figure 3.26 Alignment Group The next new formatting skill is to change the label in E3 from Size (km2) to Size (km?) with the 2 after km formatted with superscript. 193 DIANE SHINGLEDECKER 1. Double-click on cell E3 to enter Edit mode 2. Select just the 2 (be careful not to select anything else). 3. On the ribbon (Home tab) click the dialog box launcher arrow in the Font group. G mac users: there is no dialog box launcher for Excel for Mac. Instead, choose Format from the Menu Bar, click Cells; cesium” then con- tinue with Steps 4 and 5 4, Inthe Effects section of the Format Cells dialog box, check the box for Superscript (see Figure 3-27). Click OK. 5. Save the CH3 Gradebook and Parks file. Format cal rx fot font Fant ye se ais >| |" a] Bicone 0 te debe Devanagat i ||: agency"® Salatate igen e i tL 20 ¥ Lnceine ier Mone tte Distnyetnrough ‘Superscript checkbox Csuneeseret raBbCcYyZz Cisunseret Thisis atrueTipe font. Thesane fent wll de used on noth your printer and yourscreen, ce Figure 3.27 Font Tab in Format Cells Dialog Box REPEATING COLUMN (AND ROW) LABELS Now that you have fixed the cell and text formatting, you are ready to review the worksheet in Print Preview. You will notice that the worksheet is printing on multiple pages, and you cannot tell what each column of data represents on some of the pages. 1. With the CH3-Gradebook and Parks file still open, and the Parks tab selected, go to Back- BEGINNING EXCEL 2019 18 stage View by clicking the File tab on the ribbon. Select Print from the menu. Mac users: choose File from the Menu Bar, and then choose Print Click through each of the pages. The worksheet is currently printing on four pages (@ Mac users may only see three pages but that is ok), with the City and Sizes columns printing on separate pages from the rest of the data . Change the Orientation from Portrait to Landscape. This fits all of the columns on one page. All of the columns are now on the same page, but the second and third pages have no column labels to identify what information is in each column. You are going to use Print Titles to repeat the first three rows of the worksheet on each of the printed pages. To set Print Titles you need to exit Print Preview. . Exit Backstage View then click the Page Layout tab on the ribbon. Click the Print Titles button in the Page Setup group on the ribbon. The dialog box shown in Figure 3.28 should appear. Click the Sheet tab if necessary. | Page Setup eg Page Margins Headerfooter [Sheet brant area: 5 Print tiles Rowste repeat at tp Colunnsto repeat tet eit Daiaines Comments: [(uonei Cl pbceand wie C1 pratt quay Ci ow and cojuma headings Ccellgrrers as: displayed age order (© Down, then over ‘© Over, then down Print. Print Preview pions 7. Click in the Rows to repeat at top: box. Be sure your insertion point is blinking in that box before moving on to the next step. 195, DIANE SHINGLEDECKER 8. Inthe worksheet, select Rows 1 through 3. The text $1:$3 should now appear in the Rows to repeat at top: box. 9. Click OK. You will not see a change to the worksheet in Normal view, so you will need to return to Print Pre- view. While looking in Print Preview, you will notice that the pages are breaking in inconvenient places. 1. Go to Print Preview and look at each of the pages. Notice that the first three rows are now repeated at the top of each page. 2. Exit Backstage View. Seg 4. Open the Page Setup dialog box and click the Sheet tab. 2. Click in the Rows to repeat at top: box or the Columns to repeat at left: box. 3. Click in the worksheet and select the row(s) or column(s) that you want to repeat on each page. INSERTING PAGE BREAKS Notice that the data for California is split between the first and second pages. You want all of the data for each state to be together on the same page, so you need to control the page breaks. You are going to start by inserting a page break before the California data to force it to start on the sec- ond page, then you will move the page break for the third page if needed. To make these changes you are going to work in Page Break Preview. 1. Click the View tab on the ribbon then click Page Break Preview in the Workbook Views Group. Your screen should look similar to Figure 3.29. BEGINNING EXCEL 2019 198 atoms Reet [exter ons toner so 2 Ine colerado UBS NORV Vee awe ewe eee eee Figure 3.29 Page Break Preview G Mac Users: in the next paragraph below, the location of the automatic page breaks may be in different locations, That's ok. In Page Break Preview, automatic page breaks are displayed as dotted blue lines. Notice the dotted blue lines after rows 13 and 28. These lines indicate where Excel will start a new page. For this worksheet, you want the first page to break before the California data, so you are going to insert ‘a manual page break. 1. Select cell A15. When inserting a page break, you select the cell below where you want the page break to appear. 2. Click the Page Layout tab on the ribbon. 3. Click the Breaks button in the Page Setup group (see Figure 3.30). 4, Select Insert Page Break from the menu. There is now a solid blue line after row 14, which indicates a manual page break that was inserted. 5. Go to Print Preview. Notice that the California data now starts on the second page. 197 DIANE SHINGLEDECKER 2 as crsend Pret fs : Ties Figure 3.30 Breaks Button on Page Layout tab While looking at each page in Print Preview you decide that the third page should start with Mon- tana, To make this change you are going to move the automatic page break that appears after Nevada. 1. Exit Backstage View. Switch back to Page Break Preview if needed. 2. Locate the next dotted blue line (automatic page break). 3. Put your pointer over the dotted blue line and it will switch to a vertical double-headed arrow. Click on the dotted blue line and drag it above Montana. 4. Release the mouse button when the line is above row 30 (above Montana). The line will now be a solid blue line, indicating a manual page break, 5. Go to Print Preview. The Montana data now appears at the top of the third page. While evaluating the pages in Print Preview you decide that there is too much white space at the bottom of the pages. To fix this, you are going to center the contents vertically on the pages. 1. Click the Page Setup link at the bottom of the Settings section of Backstage View to open the Page Setup dialog box. © Mac Users: there is no “Page Setup link" in Print Preview for Excel for Mac. Click the Margins list arrow instead, and choose “Manage Custom Margins” then continue with the steps below. q== J 2. Click on the Margins tab. 3. In the Center on page section, check the box for Vertically then click OK. 4, Review each page in Print Preview to see the changes. Exit Backstage View. CREATING A HEADER AND FOOTER USING PAGE LAYOUT VIEW Now that the worksheet is printing on three pages, with page breaks in appropriate places, you are ready to add a header with the current date and filename. You will also add a footer with the BEGINNING EXCEL 2019 198 page number and the total number of pages that will appear as Page 1 of 3. You are going to edit the header and footer in Page Layout View. 1 10. M1. 12. 13, [a] Page Numbe of Pages Date Time Path Name Name Pictu Click the View tab on the ribbon and click the Page Layout button in the Workbook Views group. ‘The white space at the top of the worksheet should say Add header. Place the mouse pointer over the left section of the Header and click to activate that section. G Mac Users should rake sure the mouse pointer turns into a small page icon then click in the left section of the Header Click the Header & Footer Tools Design tab on the ribbon. Click the Current Date button in the Header & Footer Elements group (see Figure 3.31). Inserting the date this way will insert a field that will update every time the workbook is opened. Click in the right section of the Header. Click the Filename button in the Header & Footer Elements group (see Figure 3.31). Inserting the filename this way will insert a field that will update if the filename is changed. Click the Go to Footer button in the Navigation group of commands. In the center section of the footer, type the word Page with a space after it. Click the Page Number button in the Header & Footer Elements group (see Figure 3.31), then type a space after the &{Page] code that appears. Type the word of with a space after it, then click the Number of Pages button in the Header & Footer Elements group (see Figure 3.31). The footer should match Figure 3.32, Click anywhere on the worksheet to close the Footer editing. Review the worksheet again in Print Preview. Pay careful attention to the page numbers in the footer to ensure they will print correctly, then exit Backstage View. View the correct print preview screenshot below in Figure 3.33 Check the spelling on all of the worksheets and make any necessary changes. Save and submit the CH3-Gradebook and Parks workbook fh © Number Curent Current File Sheet Picture For Header & Footer Elements Figure 3.31 Header & Footer Elements buttons 19 DIANE SHINGLEDECKER Page Rage nt Pag Figure 3.32 Completed Footer BEGINNING EXCEL 2019 [National Parks of the Western States +L see rockName. Figure 3.3 - Print Preview of Parks sheet 201 DIANE SHINGLEDECKER ACen Inserting Page Numbers 1. In Page Layout View, click in the section of the header or footer where you want the page num- ber to appear. 2. Type the word Page, followed by a space, and then click the Page Number button in the Header & Footer Elements group on the Header & Footer Tools Design ribbon. This will create Page 1 3. If desired, type a space after the &[Page] code then type the word of followed by a space. Then click the Number of Pages button. This will create Page 1 of 4 COMME + Always check the formatting of your worksheets for consistency. + Ifa worksheet is printing on multiple pages, use Print Titles to repeat rows at the top and/or columns at the left of every page to make it easier to interpret the data. + Insert manual page breaks as needed in Page Break Preview to control where @ new page begins. + Multiple page worksheets should include the page number in either the header or footer. Be sure to insert the Page Number elernent so that the correct page number will display on each page of the worksheet. ATTRIBUTION "3.4 Preparing to Print” by Julie Romey and Art Schneider, Portland Community College is licensed under CC BY 4.0

You might also like