## Excel Tip: Multiple criteria SUM, MIN, and MAX formulas

Click on cell F3, and then select the first criteria within the formula, as shown in Figure 2.

**Select the first criteria within the formula**

*Figure 2:***Press F9 to show the corresponding values for a portion of an Excel formula**

*Figure 3:*Notice that ($A$2:$A$6=G$2) changes to {TRUE;TRUE;FALSE;TRUE;TRUE}. The TRUE values indicate cells where the word Operations appears, FALSE appears when something else is in the cell.

Next, select this portion of the formula and press F9

($B$2:$B$6=$E3)

Your formula should now look like this:

=SUM(IF({TRUE;TRUE;FALSE;TRUE;TRUE}*{TRUE;TRUE;TRUE;FALSE;FALSE},$C$2:$C$6))

You can see that both sets of criteria return TRUE for the first two values. The last 3 values return varying combinations of TRUE/FALSE. Excel uses the TRUE values to identify which cells to add up in the range C2:C6.

Finally, select the entire IF statement in the formula bar and press F9 to see this result:

=SUM({22;72;FALSE;FALSE;FALSE})

The word FALSE and zero are interchangeable in Excel formulas, which is why SUM can add up all of the values and only return a value for the cells where both criteria are met. In essence, Excel creates an array that stores the values that it sums, rather than referring to a set range of cells. This allows array formulas to perform calculations that aren’t possible with typical worksheet formulas.

Keep in mind that the F9 trick I just shared is a helpful formula auditing tool, but be sure to press the Escape key to restore your formula. If you press Enter or Ctrl-Shift-Enter, you’ll replace your cell references with static values. If you forget to press Escape, press Ctrl-Z immediately to restore the original formula.

Also, there are other alternatives for summing ranges based on multiple criteria. Excel 2007 and 2010 users can use the new SUMIFS function, while the SUMPRODUCT function works in any version of Excel. Array formulas such as those above also work in any version of Excel, and provide yet another way to analyze data in Excel.

Now that we understand how the SUM function works with multiple criteria, we can apply the exact same technique with the MIN and MAX functions. Cell G3 in Figure 1 contains this formula:

=MIN(IF(($A$2:$A$6=G$2)*($B$2:$B$6=$E3),$C$2:$C$6))

Cell H3 in Figure 1 contains this formula:

=MIN(IF(($A$2:$A$6=H$2)*($B$2:$B$6=$E3),$C$2:$C$6))

Don’t forget to press Ctrl-Shift-Enter after you type these formulas.

**About the author:**

*David H. Ringstrom, CPA heads up Accounting Advisors, Inc., an Atlanta-based software and database consulting firm providing training and consulting services nationwide. Contact David at*

*david@acctadv.com*

*or follow him on*

*. David speaks at conferences about Microsoft Excel, and presents webcasts for several CPE providers, including AccountingWEB partner*

*CPE Link*

*.*

## Pages

## You may like these other stories...

Event Date: May 29, 2014 In this presentation Excel expert David Ringstrom, CPA brings you up to speed on the Excel feature you should be using, but probably aren't. The Table feature offers the ability to both...

No field likes its buzzwords more than technology, and one of today's leading terms is "the cloud." But it's not just a matter of knowing what's fashionable. Accounting professionals who know how to use...

There is a growing trend of accountants moving away from traditional compliance work to more advisory work. Client demand is there, but it is up to the accountants to capitalize on that. What should accountants' roles be...

## Email sign-up

## Upcoming CPE Webinars

Apr 22

Is everyone at your organization meeting your client service expectations? Let client service expert, Kristen Rampe, CPA help you establish a reputation of top-tier service in every facet of your firm during this one hour webinar.

Apr 24

In this session Excel expert David Ringstrom, CPA introduces you to a powerful but underutilized macro feature in Excel.

Apr 25

This material focuses on the principles of accounting for non-profit organizations' revenues. It will include discussions of revenue recognition for cash and non-cash contributions as well as other revenues commonly received by non-profit organizations.

Apr 30

During the second session of a four-part series on Individual Leadership, the focus will be on time management- a critical success factor for effective leadership. Each person has 24 hours of time to spend each day; the key is making wise investments and knowing what investments yield the greatest return.

View the discussion thread.