Who Knew Excel Could Do That? Ten Top Tips
Make your spreadsheets work harder and give them a polished look with these nifty tricks.
John Walkenbach
6. Zap the Numbers, Keep the Formulas
One common type of spreadsheet is a fill-in-the-blanks template. Typically, such a sheet will have a number of input cells, and a number of formula cells. You enter your data in the input cells, and the formula cells kick into action and use those values to display some type of (usually) useful result.
For example, you may have a worksheet set up to calculate a loan amortization table. Input cells would include items such as loan amount, interest rate, loan term, and so on. Formulas in other cells use this information to display the calculated results.
At some point, you may want to clear the slate and delete all the values in the input cells. Rather than scroll around and look for the non-formula cells, you can take advantage of an often-overlooked Excel feature that lets you select cells in a "special" way:
- Select
Edit, Go To (or press
Ctrl-G or
F5) to bring up the Go To dialog
box.
- Click the
Special button to show the Go To Special
dialog box.
- Choose the
Constants option, then clear all of the
check boxes except Numbers (if some of the input cells in the spreadsheet
accept text, leave the check mark next to Text).
- Click
OK, and Excel will select all of the
non-formula cells that contain a value.
- Press the
Delete key, and those numbers are
history--but the formulas remain intact.
7. Protect and Hide Your Formulas
When a cell contains a formula, the formula is visible for all to see. Just activate the cell and glance up at the Formula bar. In some cases, you many want to hide your formulas to give your worksheet a cleaner look--or to keep others from seeing how your calculations are done.
You can hide the formulas by setting the Hide option for the formula cells and protecting the sheet. But before you protect the sheet, you need to "unlock" all non-formula cells (by default, all cells are locked).
Here's how to hide the formula cells:
- Select
Edit, Go To (or press
Ctrl-G or
F5) to bring up the Go To dialog
box.
- Click the
Special button to show the Go To Special
dialog box.
- Choose the
Formulas option, and make sure the four
check boxes are all checked.
- Click
OK, and Excel selects all cells that
contain a formula.
- Choose
Format, Cells, and click the
Protection tab.
- Place a check mark
next to the Hidden option, and make sure that there is a check mark next to the
Locked option. Click
OK.
Here's how to unlock the non-formula cells:
- Repeat Steps 1 and 2 above to show the Go To Special
dialog box.
- Choose the
Constants option, and make sure the four
check boxes are all checked.
- Click
OK, and Excel selects all non-empty cells
that don't contain a formula.
- Choose
Format, Cells, and click the
Protection tab.
- Remove the check
mark next to the Locked option. Click
OK.
At this point, the formula cells are set to Hide, and the non-formula cells are set to Unlock. But these settings have no effect unless the sheet is protected. Choose Tools, Protection, Protect Sheet to protect the worksheet. You can enter a password if you like.
After performing these steps, you can select any formula cell, and the formula will not be displayed in the Formula bar. Furthermore, the formula cannot be changed. But the cells that contain other information can be changed.
It's important to understand that protecting a worksheet--even if you use a password--is a very weak form of security. Password-cracking utilities are widespread on the Internet.
8. Spot Duplicate Entries
This tip describes a way to use the Conditional Formatting feature to quickly identify dupes in a range.
Say that you've been saddled with the job of organizing the seating list for the company dinner party. You have the list of assignments in range A1:B18. Obviously, the same person should not be assigned to more than one table. Here's a quick way to determine if the range contains duplicate names.
- Select the range (in this case,
A1:B18).
- Choose
Format, Conditional Formatting to display
the Conditional Formatting dialog box.
- Select
Formula Is from the first drop-down list
box, and enter
=COUNTIF($A$1:$B$18,A1)>1 in the second
box.
- Click the
Format button to bring up the Format Cells
dialog box.
- Select the
Patterns tab, and specify a background
color.
- Click
OK twice to return to your worksheet.
- If the range contains any duplicate entries, they will be flagged with
the background color you chose in Step 5.
You can adapt this technique to any other worksheet by changing the ranges used in the COUNTIF function. The first argument should be the full address of the range you selected--and make sure that you use the dollar signs to signify an absolute reference. The second argument should be the address of the upper left cell of your range, expressed as a relative reference (no dollar signs).
9. Skip From Cell to Cell
You may have a spreadsheet set up with a number of data input cells. Wouldn't it be nice if the user could just press the Tab key to jump to the next input cell?
This type of thing is fairly easy to set up. The key is to unlock the input cells, and then protect the worksheet. Here's how to do it:
- Select all of the input cells on your worksheet. (To
select non-adjacent cells, hold down
Ctrl while you select the
cells.)
- Select
Format Cells to display the Format Cells
dialog box.
- Click the
Protection tab and remove the check mark
from the Locked check box.
- Click
OK.
Keep in mind that all cells are locked by default. But also remember that locking or unlocking cells has no effect unless the worksheet is protected. To protect the worksheet, select Tools, Protection, Protect Sheet. If you're using Excel 2002, you'll be able to specify some additional options. Specifically, you can remove the check mark from the Select locked cells option.
When the sheet is protected, you'll find pressing Tab moves the heavy-bordered active cell indicator to the next unlocked cell. Be aware that this does not prevent the user from selecting unlocked cells using the cursor keys--unless you're using Excel 2002 and you removed the check mark from 'Select locked cells' as described above.
10. Hide Those %&@# Formula Errors
If you've dabbled with formulas, you've probably encountered the dreaded formula error. Rather than return a numeric result, the formula cell displays a weird message such as #VALUE! or #DIV/0!.
Most of the time, this means you need to track down the source of the error and fix it. But sometimes a formula error simply means that the data used by the formula is not yet available. For example, say you run a small telemarketing company. You might have a spreadsheet set up to track your daily sales as a percentage of calls made.
The formulas in column D do the calculations that come up with the percentages. For example, cell D4 contains the formula =C4/B4. The formula in D4 was simply copied down the column to handle the other days.
The formula does its job well--as long as there is data to calculate. An empty cell (such as B9) is treated as a zero, and division by zero is not allowed on this planet. As a result, Excel displays an ugly #DIV/0! error message, which makes your entire worksheet look like it was created by a novice.
You can avoid displaying formula errors by re-writing your formula to use an IF and an ISERROR function. For example, =IF(ISERROR(C4/B4),"", C4/B4) displays a blank if the division operation results in an error (cell B4 is empty or contains 0), yet still displays valid results.
Although this formula looks complex, when you break it down, it's not that daunting. In plain English: If you get an error performing the formula, then display an empty string (that is, nothing); otherwise, display the result of the formula.
It's actually easy to adapt this technique to any formula you might have. The original formula serves as the argument for the ISERROR function, and it repeats as the last argument of the IF function, like this: =IF(ISERROR(OriginalFormula),"",OriginalFormula)
If you prefer, you can replace the empty string ("") with other text of your choice--just make sure the text is enclosed in quote marks.
By the way, if you really own a small telemarketing company, please put me on your "do not call" list. Thank you.
- « Prev
- Page 2 of 2
With HP wireless printers, you could have printed this from any room in the house. Live wirelessly. Print wirelessly.
PCW Download Guide
CDW Virtualization Center
Related Office Articles
- Xcelsius: How to Ruin a Great Application A really, really, really cool application gets sidelined in a swirl and flurry of filthy lucre.
- File Storage and Viewing Apps for IPhone Storing media like photos, music, and video on your iPhone is a snap: after all that's what the device was designed for. But...
- Office 2008 Survival Guide If you've recently upgraded to Microsoft Office 2008, you may like the productivity suite's new features, but you may also...
- Microsoft Fights Piracy with Price Drop--in Kenya Microsoft East Africa has reduced the price of its Office suite software while complaining of rampant software piracy.
- E-Mail Hoaxes, XP Buyers, and Symantec's Buy Readers discuss crazy hoaxes, why XP is still popular, and what Symantec's purchase of PC Tools means.
Best Prices on Security Software
Norton Internet Security 2008Price: $19.15
Internet Security 2008 - 3-User (Full Product, PC)Price: $12.99
Internet Security Suite 2008 - 3-UserPrice: $18.95
Norton 360 2.0 ( PC)Price: $33.99
Internet Security 7.0 - 3-UsersPrice: $17.95
Norton 360Price: $32.99
- Web Demo: Discover the Benefits of VoIP Is your company looking for a world class VoIP communications solution that will meet all of your business requirements? If so, join us for our Live Online Demo where you will receive a "guided tour" to the AltiGen Solution.
- PC World Webcast: Going Green Wondering how to make your business greener? These tips will help your business save money, and save the environment.
- A Windows Vista FAQ Corporate customers are deploying Windows Vista now, and Dell Services wants to help you understand the features of the new OS and how to plan your Windows Vista deployment.





