Chapter 2: Managing Workbooks and Worksheets
Learning Objectives
- Import data from text files (.txt and .csv) and from online sources.
- Search for data, go to named cells, ranges and workbook elements, and insert, edit and remove hyperlinks.
- Customize the Quick Access Toolbar.
- Switch between worksheet views, freeze rows and columns, and change window views.
- Change built-in workbook properties and display formulas.
Introduction to Excel taught you to work inside a worksheet. This chapter covers the MO-210 skills for working with a workbook: bringing data in from outside, finding your way around a large file, and controlling what Excel shows on screen. None of these skills is hard, but exam tasks describe them in terms of their results, so you need to know each one well enough to recognize it from a description.
2.1 Importing data
Data often starts outside Excel, in a text file exported from another program or in a table on a web page. Excel's Get Data tools (also called Power Query) bring that data into a worksheet as a table.
2.1.1 Importing a text or CSV file
A delimited text file stores a table as plain text. Each line is a row, and a character called a delimiter separates the columns. In a CSV (comma-separated values) file the delimiter is a comma. Other text files may use tabs, semicolons or another character.
VendorID,Vendor,City,Rating
V-101,Summit Gear Co.,Denver,4.6
V-102,Blue Ridge Textiles,Asheville,4.1
V-103,Cascade Optics,Portland,4.8
To import a text or CSV file:
- Click the cell where you want the data to start, or start in any cell if you'll load it to a new sheet.
- Select Data › Get Data › From File › From Text/CSV (or Data › From Text/CSV in the Get & Transform Data group).
- Find the file and click Import.
- Excel shows a preview. Check the settings above the preview:
- File Origin is the file's character encoding. Change it only if accented letters or symbols look wrong.
- Delimiter is the character that separates columns. Excel usually guesses correctly. If the preview shows everything in one column, choose the right delimiter.
- Data Type Detection controls how Excel decides whether a column holds numbers, dates or text.
- Choose how to load the data:
- Load puts the data in a new worksheet as an Excel table.
- Load To opens the Import Data dialog box, where you can choose a table, a PivotTable or just a connection, and choose Existing worksheet with a starting cell.
- Transform Data opens the Power Query Editor, where you can clean the data before loading it. The exam doesn't require the editor.
Read import tasks closely for where the data should go. "Import the data to a new worksheet" means Load. "Import the data starting at cell A3 of the Vendors worksheet" means Load To › Existing worksheet with =$A$3. If the task says to keep the file's header row as column headings, check that the preview's first row shows the headings and not data.
The imported table stays connected to the file. When the file changes, Data › Refresh All reloads it. To see or change the connection, open Data › Queries & Connections.
2.1.2 Importing data from an online source
Excel can also import a table from a web page:
- Select Data › From Web.
- Type or paste the page's address (URL) and click OK. If Excel asks how to connect, choose Anonymous for a public page and click Connect.
- The Navigator lists every table Excel found on the page. Click one to preview it.
- Select the table you want and click Load (or Load To to choose the location).
The data arrives as an Excel table connected to the web page, so Refresh All updates it with the page's current values.
2.2 Navigating a workbook
2.2.1 Finding data
Find (Home › Find & Select › Find, or Ctrl+F) searches for text or numbers. Click Options to see its settings:
| Setting | What it does |
|---|---|
| Within | Sheet searches the current worksheet; Workbook searches every sheet. |
| Search | Searches by rows or by columns. This changes only the order of the results. |
| Look in | Searches formulas, values, notes or comments. Choose Values to find a number that a formula returns. |
| Match case | Finds only text with the same capitalization. |
| Match entire cell contents | Finds only cells that contain exactly the search text and nothing else. |
Find Next jumps to one match at a time. Find All lists every match, with its sheet, cell and value. Click a result to go to that cell.
The Replace tab (Ctrl+H) works the same way, with a box for replacement text.
"Search the workbook" is a common exam detail. Find searches only the current sheet unless you change Within to Workbook.
2.2.2 Going to named cells, ranges and other elements
A workbook can name cells and ranges (chapter 4 shows you how) and contain tables, charts and other objects. There are several ways to jump to them:
- The Name Box, to the left of the formula bar, lists every named range and table. Click its arrow and choose a name, and Excel selects that range. You can also type a cell address such as
Z200in the Name Box and press Enter. - Go To (Home › Find & Select › Go To, F5 or Ctrl+G) lists the same names. Choose one, or type a reference, and click OK.
- Go To Special, from the Go To dialog box or Find & Select, selects cells of a particular kind, such as blanks, formulas, constants, comments or the last used cell.
- The Navigation pane (View › Navigation) lists every worksheet in the workbook, with the named ranges, tables, charts and pictures on each. Click an item to go to it.
2.2.3 Hyperlinks
A hyperlink is clickable text in a cell that opens a web page, a file, an email message or another place in the workbook. To insert one, select the cell and choose Insert › Link (Ctrl+K). The Insert Hyperlink dialog box has four kinds of link along its left side:
- Existing File or Web Page links to a file on your computer or a web address. Type the URL in Address.
- Place in This Document links to a cell on a worksheet or to a defined name. Choose the sheet, then type the cell reference.
- Create New Document makes a new file and links to it.
- E-mail Address opens a new message to that address, with an optional subject.
Two other boxes matter on the exam:
- Text to display is what the cell shows. A task such as "display the text Vendor list" means this box.
- ScreenTip is the note that appears when someone points at the link.
To change a link, right-click it and choose Edit Link. To remove one, right-click it and choose Remove Link. That keeps the text but removes the link. To remove links from a whole range, select the range and choose Home › Clear › Remove Hyperlinks.
Clicking a cell that contains a link follows the link. To select the cell without following the link, click it and hold the mouse button until the pointer turns into a plus sign, or select a neighboring cell and use the arrow keys.
2.3 Customizing the Quick Access Toolbar
The Quick Access Toolbar is a small row of command buttons above or below the ribbon. It's always visible, whichever ribbon tab is open. If you don't see it, right-click the ribbon and choose Show Quick Access Toolbar.
You can change the toolbar in three ways:
- Add a command from the ribbon. Right-click any ribbon button and choose Add to Quick Access Toolbar.
- Use the toolbar's menu. Click the Customize Quick Access Toolbar arrow at the end of the toolbar and check a common command, such as Quick Print or Sort Ascending, or choose Show Below the Ribbon or Show Above the Ribbon to move the toolbar.
- Use Excel Options. Choose More Commands from the toolbar's menu (or File › Options › Quick Access Toolbar). Pick a command from the list on the left and click Add. Use the up and down arrows to change the order, Remove to take a command off, and Reset to restore the defaults.
To remove a command quickly, right-click it on the toolbar and choose Remove from Quick Access Toolbar.
In the Excel Options dialog box, the drop-down above the right-hand list chooses whether your changes apply to all documents or only to the current workbook. The default is all documents. If a task says to change the toolbar "for this workbook only," choose the workbook's name from that list first.
2.4 Views and windows
2.4.1 Worksheet views
The View tab's Workbook Views group, and the three buttons at the right end of the status bar, switch between three views:
- Normal is the view you usually work in.
- Page Layout shows each printed page with its margins, headers and footers. You can type headers and footers directly in this view.
- Page Break Preview shows where pages will break when you print. Blue lines mark the breaks: dashed lines are breaks Excel chose and solid lines are ones you set. Drag a line to move a break. Areas outside the print area are gray.
To add a page break yourself, select the row below (or column to the right of) where the break should go and choose Page Layout › Breaks › Insert Page Break.
2.4.2 Freezing rows and columns
Freezing keeps rows or columns in view while you scroll, so headings stay on screen. Choose View › Freeze Panes and one of these options:
- Freeze Top Row keeps row 1 visible.
- Freeze First Column keeps column A visible.
- Freeze Panes freezes every row above and every column to the left of the active cell. To freeze rows 1–3 and column A, select cell B4 first. To freeze only rows, select a cell in column A (A4 freezes rows 1–3).
To undo freezing, choose View › Freeze Panes › Unfreeze Panes.
Freeze Panes uses the active cell, not the rows you see on screen. If a task asks you to keep the first two rows visible, select a cell in row 3 of column A before choosing Freeze Panes. Freeze Top Row freezes only one row.
2.4.3 Window views
The View tab's Window group changes how workbook windows are arranged:
- New Window opens a second window on the same workbook, so you can see two parts of it at once. The title bar shows :1 and :2 after the workbook's name. Edits in either window change the same file.
- Arrange All places all open windows side by side. Choose Tiled, Horizontal, Vertical or Cascade. Check Windows of active workbook to arrange only the windows of the current workbook.
- View Side by Side compares two windows. Synchronous Scrolling scrolls them together, and Reset Window Position makes them the same size again.
- Split divides the window into two or four panes above and to the left of the active cell. Each pane scrolls on its own. Drag a split bar to move it, or click Split again to remove it.
- Hide and Unhide hide a whole workbook window without closing it.
- Switch Windows lists all open windows so you can jump to one.
Split and Freeze Panes look alike, but they work differently. Split lets you scroll each pane on its own. Freeze Panes locks the top or left part in place. A task about keeping headings "visible at all times" wants Freeze Panes. A task about viewing "two separate parts of the worksheet at the same time" wants Split or New Window.
2.5 Workbook properties and showing formulas
2.5.1 Built-in properties
Every workbook has properties: information about the file such as its title, author, subject, tags and categories. To change them, choose File › Info. The Properties list on the right shows the common ones. Click a value, such as Add a title or Add a tag, and type. Click Show All Properties to see the rest, such as Subject, Company and Manager.
You can also choose Properties › Advanced Properties at the top of the list. The Summary tab of that dialog box has boxes for title, subject, author, manager, company, category, keywords (tags) and comments.
Tasks say "property" in plain words, such as "Set the Title property of the workbook to Q3 Vendor Review." Type the value exactly as shown. Tags appear as Keywords in the Advanced Properties dialog box, and they're the same property.
2.5.2 Displaying formulas
Normally a cell shows the result of its formula. To show the formulas themselves in every cell, choose Formulas › Show Formulas or press Ctrl+` (the grave accent key, to the left of 1). Columns widen to fit the formulas. Choose the command again to switch back. Show Formulas applies only to the current worksheet.
2.6 Practice
Simmy assessment goes here. Exam-style tasks on importing data, navigation, hyperlinks, the Quick Access Toolbar, views and windows, workbook properties and showing formulas. When a student misses a task, Simmy builds the AI prompt (the task as worded, what the student did, and the correct result).
Starting data. A workbook named Ridgeview Outdoor Supply with three sheets.
Sales (A1:F13; row 1 is headings; a named range Q1_Total refers to F2:F13):
| Region | Rep | Jan | Feb | Mar | Q1 Total |
|---|---|---|---|---|---|
| North | Alvarez | 18,400 | 17,950 | 20,100 | =SUM(C2:E2) |
| North | Brooks | 15,200 | 16,800 | 15,900 | =SUM(C3:E3) |
| North | Chen | 21,050 | 19,700 | 22,300 | =SUM(C4:E4) |
| South | Diaz | 12,900 | 14,100 | 13,750 | =SUM(C5:E5) |
| South | Evans | 16,300 | 15,850 | 17,200 | =SUM(C6:E6) |
| South | Foster | 11,800 | 12,450 | 12,900 | =SUM(C7:E7) |
| East | Garcia | 19,600 | 20,250 | 21,400 | =SUM(C8:E8) |
| East | Huang | 14,750 | 13,900 | 15,300 | =SUM(C9:E9) |
| East | Ibrahim | 17,100 | 18,300 | 18,650 | =SUM(C10:E10) |
| West | Jensen | 22,400 | 21,800 | 23,950 | =SUM(C11:E11) |
| West | Kowalski | 13,350 | 14,600 | 14,100 | =SUM(C12:E12) |
| West | Lopez | 18,900 | 19,450 | 20,200 | =SUM(C13:E13) |
Notes (A1): "Return policy reviewed by Brooks in March."
Vendors: empty.
Text file vendors.csv (comma-delimited, header row):
VendorID,Vendor,City,Rating
V-101,Summit Gear Co.,Denver,4.6
V-102,Blue Ridge Textiles,Asheville,4.1
V-103,Cascade Optics,Portland,4.8
V-104,Prairie Packs,Omaha,3.9
V-105,Harbor Footwear,Savannah,4.4
Tasks.
- Import the data from the vendors.csv file into the Vendors worksheet, starting at cell A1. Keep the file's first row as column headings. Expected result: a table on Vendors starting at A1 with headings VendorID, Vendor, City, Rating and five data rows; Rating values are numbers. Objective: Import data from text files.
- Find every occurrence of the name Brooks in the workbook. Change the cell on the Notes worksheet so it reads "Return policy reviewed by Brooks-Hale in March." Expected result: Notes!A1 reads "Return policy reviewed by Brooks-Hale in March."; Sales!B3 is unchanged. Objective: Search for data within a workbook.
- In cell H1 of the Sales worksheet, insert a link to the Q1_Total range. Display the text Jump to totals. Expected result: Sales!H1 shows "Jump to totals" and is a hyperlink to the defined name
Q1_Total. Objective: Insert and remove hyperlinks; Navigate to named cells, ranges, or workbook elements. - On the Sales worksheet, ensure that the headings in row 1 and the region names in column A remain visible as you scroll. Expected result: panes frozen at B2 (row 1 and column A frozen). Objective: Freeze worksheet rows and columns.
- Add the Sort Ascending command to the Quick Access Toolbar. Expected result: the Quick Access Toolbar includes Sort Ascending (Sort A to Z). Objective: Manage the Quick Access toolbar.
- Set the Title property of the workbook to Q1 Regional Sales and add the tag quarterly. Expected result: Title = "Q1 Regional Sales"; Tags (Keywords) = "quarterly". Objective: Modify built-in workbook properties.
- Display the Sales worksheet in a view that shows where pages will break when the worksheet prints. Expected result: Sales is in Page Break Preview. Objective: Display and modify worksheets in different views.
- On the Sales worksheet, display the formulas instead of their results. Expected result: Show Formulas is on for Sales. Objective: Display formulas.
Simmy note: importing from an online source isn't practiced here because it needs a live web page. If Simmy can simulate the From Web Navigator, add a task that imports a named table from a page.