» Counting Based on Multiple Criteria
CATEGORY - Excel Array Formulas
VERSION - All Microsoft Excel Versions
In this example, we will count the number of rows in which the text ExcelTip and USA appear in both columns B and C (the range Name for column B is Customer_Name, and for column C it is Market).To count the number of rows that must satisfy criteria from two columns:
Insert the following Array Formula (see how to insert an Array Formula in page 2 of this Tip):
{=SUM((Market="USA")*(Customer_Name="ExcelTip"))}
The result of the calculation is 2. The * symbol in the Array Formula returns a result equal to the AND operator.
To count the number of cells that satisfy at least one of two criteria from different ranges:
Replace the * symbol in the Array Formula with a + sign.
The return result calculation is 5, that is, five cells in column B match the criteria ExcelTip and four cells in column C match the criteria USA.
Note: This can also be done by replacing the Array Formula with a COUNTIF formula:
=COUNTIF (Market, "USA")+ COUNTIF(Customer_Name, "ExcelTip")
Using keyboard shortcuts
The keyboard shortcut for inserting an Array Formula is as follows (see Tip #201):
After entering the formula into the cell, select the cell, press F2 to edit it, and then press Ctrl+Shift+Enter.

Book Store:
Recommended Books:
- Investments + S&P Card + Powerweb + StockTrak discount coupon
- Real Estate Loopholes: Secrets of Successful Real Estate Investing
- Microsoft Windows XP Registry Guide
- Essentials of Accounting and Post Test Booklet 8, Eighth Edition
- Microsoft Office Xp: Advanced Concepts and Techniques: Word 2002, Excel 2002, Access 2002, Powerpoint 2002
- Monte Carlo Methods in Finance
No comments have been submitted.

