Chapter 14
IN THIS CHAPTER
Selecting a template
Entering, formatting, and editing data
Using copy-and-paste for formatting
Using AutoFill
Checking for errors in your calculations
Filtering and sorting data
Using Find and Replace to help with editing your spreadsheets
Excel’s power as a spreadsheet derives from the flexibility it provides you in entering, formatting, deriving, analyzing, and presenting your data. Producing a bare grid of unformatted, manually entered text and numeric cells would make even the most compulsive Bob Cratchit exhausted, bored, and cross-eyed. Excel’s powerful formula creation tools help you quickly and easily calculate results from your data, and Excel’s formatting capabilities let you almost effortlessly draw attention to important data and results and, when desired, make supporting data fade into the background.
In this chapter, you find out how to use Excel’s timesaving and effort-minimizing features to avoid exhaustion, boredom, and ocular fatigue.
Traditionally, a spreadsheet (including Excel’s) starts as an empty grid filled with identically sized cells. Although such a blank canvas offers incredible flexibility, many users instead consider it incredibly intimidating. Excel’s templates let you avoid that vast expanse of emptiness by providing preconfigured and preformatted worksheets for a wide variety of common tasks that are just waiting for you to input your data into the indicated cells.
Just as it does for Word, PowerPoint, and Outlook, Microsoft Office offers Excel templates — these local templates are installed as part of Office and you don’t have to be online to access them. Just as Word templates provide a starting point when you want to create a specific type of word processing document (for example, a newsletter or a flyer), Excel templates give you a head start and framework for creating specific spreadsheet documents or performing common spreadsheet tasks (such as managing a household budget or computing and structuring a home mortgage).
And don’t forget that internet thing. Excel also offers online templates contributed by other Excel users. You can find a huge number of templates covering all sorts of common spreadsheet tasks. You can also find specific templates for movie collections, billing statements, timesheets, and more. Heck, you can find templates for purposes you’d never expect. Of course, you need an active internet connection to load these templates.
The following sections provide more details about finding and taking advantage of Excel templates.
The Workbook gallery collects all Microsoft-supplied local Excel templates and makes them available in a single location.
To create a document from a local Workbook gallery template, follow these steps:
From the list on the left, click New.
The local templates fill the large pane on the right, as shown in Figure 14-1.
Excel opens a new document based on the template you selected, and that’s all there is to it. Now all you have to do is make the template your own document by entering data into the cells.
Online templates are maintained by Microsoft on its templates website, https://templates.office.com
. You may be able to locate many of the internet-supplied templates by clicking the search field in the upper-right corner of the Workbook gallery and typing a name or category. Figure 14-2 shows a search for templates related to cards.
Microsoft continually changes and updates template categories and subcategories online, but you’re always likely to find our favorite categories:
Several decades ago, when Dan Bricklin’s VisiCalc swept personal computers from the domain of hobbyists (read “nerds”) into the realm of business, you selected a cell and then entered the spreadsheet data for that cell in a data entry box. This paradigm remains available to traditionalists by way of the traditional data-entry mechanism known as the Excel formula bar (see Figure 14-3). You specify the cell in the Name box on the left and then enter the data or formula in the Formula box on the right.
A modern graphical user interface (GUI), such as the one to which we Mac users are accustomed, begs us to enter our data directly into the cells where it belongs, and Excel obliges. Just click a cell (or navigate to it using your keyboard’s cursor keys or by typing in the Name box in the formula bar) and start typing. Then move to the next cell and enter its data.
All the usual editing techniques are available when working with a cell’s contents. You can select all or part of the data and apply formatting via the ribbon; replace the selection by typing or pasting, and position the insertion point and then type or paste new data, for example.
We expect any Mac app that allows data entry to support copying (and cutting) and pasting data as well. Excel doesn’t disappoint in that respect, but adds a few small wrinkles. For example, copying from one cell and then pasting in another brings the data, but you may not want to retain its original formatting. If you want to select which formatting is retained, right-click the destination cell, choose Paste Special from the contextual menu, and then select Paste Special again. You’re presented with the dialog shown in Figure 14-5.
Clicking the Paste button on the ribbon’s Home tab isn’t quite the same as choosing Edit ⇒ Paste. Instead, as shown in Figure 14-6, Excel pastes the data and displays a small paste options icon with a drop-down menu attached (Microsoft calls them smart buttons), in which you can choose to retain the formatting of the source being copied or to apply destination formatting (that is, any formatting you’ve already applied to the destination cell).
You might also be a little disconcerted the first time you choose Edit ⇒ Cut. Rather than make the data disappear, as this command does in most Office apps, it creates a dotted outline border on the selected cell. When you select another cell and paste, the data and the outline disappear.
Finally, you can use the format icon (paintbrush) on the left side of the ribbon’s Home tab to copy only a cell’s formatting and apply it to one or more other cells. Follow these steps:
Spreadsheet users commonly want to fill a group of cells (rows or columns) with data. Sometimes, you need to work with a series of numbers (for example, 1–30) or common text labels (such as days of the week or months of the year), and sometimes, you need to use a repeated value (such as a default zip code).
To AutoFill a set of cells, follow these steps:
Hover the cursor over the lower-right corner of the cell containing the initial value or the value to be repeated.
This action displays the fill handle, as shown on the left in Figure 14-7.
Drag down (or across) a group of cells, as shown on the right in Figure 14-7.
Your values fill the cells you’re dragging over.
Clicking the AutoFill smart button’s drop-down arrow presents fill choices. The default is Fill Series.
If all Excel allowed you to do was enter and format literal values in the sheet’s cells, you would have a useful electronic implementation of a ledger book, but you would be missing out on a spreadsheet’s real power — the capability to automatically calculate values in one cell based on the values in one or more other cells. The calculation that an Excel spreadsheet can perform is as basic as showing the sum or difference between two values or as advanced as working with a complex formula involving a variety of common statistical, trigonometric, financial, or date conversion functions. For example, in a Wedding Budget template, cell B9 might contain a formula (=B6-B8), telling Excel to calculate the available budget for your wedding by subtracting the actual expenses incurred to date from the total budget amount you’ve allotted.
Excel comes with hundreds of built-in functions, divided into categories. You can find a lengthy list, including descriptions of the functions, in Excel’s Help system: Go to Help ⇒ Excel Help, type Excel functions, and then click either Excel functions (by category) or Excel functions (alphabetical) to explore them.
Many functions are general purpose, such as SUM, which totals the values in the referenced cells. Others are of interest only to users in specific fields. The ATANH function (which returns a value’s inverse hyperbolic tangent, if that means anything to you!) is useful to mathematicians and engineers, and DDB (which returns asset depreciation based on the double-declining balance method) probably doesn’t do much for you unless you’re an accountant.
When creating a formula, the first character in the formula must be the equal sign (=), which tells Excel that a formula follows, not text or numeric data.
With the multitude of Excel built-in functions, many sporting somewhat cryptic names and taking multiple arguments, remembering just which function you need at any given time can be a daunting task. Excel eases the pain with Formula Builder. You can display the Formula Builder pane (shown in Figure 14-8) by choosing Formula Builder from the View menu. Also, you can click the More Help on This Function link in the Description box to call up Excel Help and display a full description of the selected function.
Selecting a function in the list gives you a brief description of it, as shown in Figure 14-8.
Formula Builder’s window (see Figure 14-9) is ready for you to start plugging in argument values as Excel starts building your formula in the selected cell.
Another Excel feature that aids you in constructing formulas is Formula AutoComplete. Formula AutoComplete kicks in when you start typing a function’s name in a cell. A list of matching names appears, and you can select the one you want from the list to complete the name (by either clicking or selecting it with the arrow keys and then pressing Return or Enter). For example, if you type =av (you must type the equal sign first to engage Formula AutoComplete), as shown in Figure 14-10, Excel displays all functions whose names start with those two letters. After you select the function you want, the cursor is positioned in the function’s argument list, awaiting your input.
If AutoComplete isn’t working for you, you need to turn on the feature:
In Excel (or any other data presentation tool), the results can be only as accurate as the underlying data. Excel can’t read your mind. If you create a formula that subtracts where it should add, your results will be erroneous and you can easily take incorrect action based on those erroneous results. Unfortunately, Excel can’t save you from that class of error, any more than it can prevent you from entering 12 when you meant to enter 1.2 (assuming that both values are permissible for that cell). However, Excel can warn about some types of errors. The values that Excel checks are controlled in the Excel Preferences Error Checking pane, shown in Figure 14-12. To open this pane, choose Excel ⇒ Preferences and then click the Error Checking icon.
When Excel spots an error, it displays a small triangle in the cell’s upper-left corner. If you click the offending cell, a smart button containing a caution icon (an exclamation point in a yellow diamond) appears. Click the smart button’s drop-down arrow and choose an option to help you resolve the issue. After you’ve corrected the problem, Excel removes the error code and the indicator.
For some people, those little menu triangles are difficult to see and, in a sheet with a lot of text, the error codes don’t necessarily stand out. Excel provides the Error Checking dialog (which you open by choosing Tools ⇒ Error Checking), shown in Figure 14-13, to help you find and fix any problems. If Excel doesn't find any errors on the sheet, it tells you, “No errors were found.” If it finds errors, it displays the Error Checking dialog, which displays errors one at a time, starting in cell A1 and going across each row in turn.
Use the following buttons in the Error Checking dialog to locate the error’s cause and fix the formula:
Ignore Error: Does just what you’d expect from its name
Ignoring some errors, such as when a formula doesn’t include adjacent cells containing data, removes the error indicator; however, if a real problem exists, such as a syntax error, the error indicator remains.
One common use for Excel is as a list manager (a simple database). Every column is a field, and every row is a record. (Okay, every row other than the first is a record if the first is used to display field names. Excel calls it a header row.) Examples of such lists are inventories of personal possessions (for example, vinyl records, which are once again in vogue), membership lists, or bridal registries. In fact, many of the online templates discussed earlier in this chapter are simple databases (lists). Excel’s powerful searching and sorting features that we're about to help you explore, along with Excel’s formulas to calculate values based on the data you enter, make Excel an excellent vehicle for this type of list management.
When presenting list data, you often need to display it in a sorted order. For example, when listing contact information, occasionally you want to sort by surname, zip code, or company or department. Excel makes these types of sorts easy to accomplish. Just follow these two steps:
Select a cell in the column you want to sort.
If you select the column header rather than a cell, Excel gives you the option to sort only the contents in the selected column or to expand your selection so that data in other columns is sorted to track with the first column.
Click the down arrow next to the Sort & Filter button on the ribbon’s Data tab and choose Sort Smallest to Largest or Sort Largest to Smallest from the pop-up menu.
Your records (the rows) are now rearranged with the sort column controlling the order in which they appear.
Another common database or list operation is to search for only those records that meet specific criteria. (For example, a library might use this type of operation to create a list of all its hardback books.) These searches filter out records that don’t match your criteria, which is why Excel calls these searches filters.
To perform a simple filtering operation, follow these steps:
Click the Sort & Filter button on the ribbon’s Home tab and click the Filter button. Or click the Filter button on the Data tab (shown in Figure 14-14).
Filter arrows appear at the top of each column.
In the column heading for the data you want to filter, click the filter arrow.
A dialog appears, as shown in Figure 14-14.
Click the value pop-up menu and select a value from the list.
Rows that don’t match your filter criterion are hidden until you choose to show them again (by clicking the filter arrow again and choosing Clear Filter).
As your worksheets fill with data, locating a particular number or piece of text can become problematic. Although Excel filters are useful for finding values in the columns of a list, not all worksheets are lists. If you want to find a particular number or text string wherever it occurs in your worksheet, a more generic searching capability is required. As usual, Excel provides commands to facilitate your searches.
You can search a cell range, sheet, or workbook for a target number or text. To do so, follow these steps:
Choose Edit ⇒ Find ⇒ Find.
The Find dialog (seeing a pattern yet?), shown in Figure 14-15, appears.
In the Find What text box, enter the target text or number.
Excel supports these three wildcard characters in your search string:
Closely related to searching text is replacing it. To find one piece of data and replace it with another, proceed as follows:
Choose Edit ⇒ Find ⇒ Replace.
The Replace dialog appears, as shown in Figure 14-16.
(Optional) Choose from the Within pop-up menu to specify whether to search only in the current sheet or all sheets in the workbook.
Choose from the Search pop-up menu to search by row or column. The Match Case check box makes a text search case-sensitive, and the Find Entire Cells Only check box confines the search to exact matches. (For example, a search for Elvis doesn’t match a cell containing Elvis Presley.)
3.149.27.72