CHAPTER 5Moving Beyond Formula Basics
Creating basic formulas and leveraging the many functions available in Excel suits the needs of many users. Other users, however, may need to create more complex formulas to perform sophisticated calculations. If the latter applies to you, be assured that Excel enables you to take advantage of techniques that streamline your formulas. This chapter introduces how to use variables and naming in formulas, passes along other formula tips, and explains how to troubleshoot common formula errors.
Introducing Formula Variables
As you build formulas, you'll notice it sometimes becomes necessary to repeat the same calculation more than once in a formula. This is often the case when writing nested formulas—formulas that use the results of other functions as arguments.
For instance, the following formula uses a nested IF function to check the result of A1+B1. If the result is less than 50, then “Below Fifty” will be displayed. If the value is greater than 100, then “Above One Hundred” will be displayed. If neither the first nor the second condition is true, then the formulas will display “In Between.”
=IF(A1+B1<50,"Below Fifty",IF(A1+B1>100,"Above One Hundred","In Between"))
You can see Excel has to calculate A1+B1 twice; once to check the first IF condition and once to check the second ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access