» Simplifying Formulas by Reducing the Complexity of IF Functions
CATEGORY - Excel Array Formulas
VERSION - All Microsoft Excel Versions
The range A2:A4 lists the three primary colors.
To find which of the various colors in column B are primary colors, we could use the following IF formula:
=IF(OR(B2=A2,B2=A3,B2=A4),"Primary Color","Not a Primary Color").
However, such a formula would become increasingly complex as the number of values in column A increases.
Solution:
Use the IF and OR functions as shown in the following Array formula:
{=IF(OR(B2=$A$2:$A$4),"Primary Color","Not a Primary Color")}

Book Store:
Recommended Books:
- The McGraw-Hill 36-Hour Course in Finance for Nonfinancial Managers
- Microsoft Excel 2002 Visual Basic for Applications Step by Step
- Rich Dad, Poor Dad: What the Rich Teach Their Kids About Money--That the Poor and Middle Class Do Not!
- H&R Block's Just Plain Smart(tm) Tax Planning Advisor: A year-round approach to lowering your taxes this year, next year and beyond
- Learn MS Excel 2002 VBA/XML Programming
- Yes, You Can Time the Market!
No comments have been submitted.

