O'Reilly logo

Excel 2013: The Missing Manual by Matthew MacDonald

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 13. Advanced Formula Writing and Troubleshooting

Over the last five chapters, you’ve learned how to use Excel’s impressive function library to calculate everything from statistical trend lines to payment schedules for home mortgages. Now that you’ve had a close look at these functions, it’s time to consider a few techniques to help you get the most from your formulas.

In this chapter, you’ll tackle four new topics that’ll make you a formula master:

  • How to use conditional logic with functions like SUMIF() and COUNTIF().

  • How to make formulas more readable by using named ranges.

  • How to control when Excel recalculates your worksheets.

  • How to solve mysterious errors by using Excel’s formula auditing tools.

Conditions in Formulas

Chapter 8 gave you a first look at using conditional logic in Excel formulas. The basic principles are easy: You construct a condition using the logical operators <, >, =, and <>, and then use that condition with a conditional function. So far, you’ve focused on one conditional function—IF()—which performs different actions depending on the result of a calculation.

Here’s an example that uses the IF() function. The following formula carries out the operation in either the second or third argument, depending on the value of cell A20:

=IF(A20>10000, A20*5%, A20*3%)

Translation: For values greater than 10,000, Excel executes the formula A20*5%; otherwise, it carries out the second formula. If A20 contains the dollar amount of a sales invoice, you can use this formula ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required