Creating an Equivalent to the MAXIF Function

by David Ringstrom,CPA
Sometimes in Excel you may want to perform an analysis based on specific criteria. For instance, if I wanted to sum only the data in Figure 1 based on the month being equal to January, SUMIF would work. I could use COUNTIF to count the number of transactions in January, or in Excel 2007 and later use the AVERAGEIF function to average January's sales. However, what if I want to determine the largest amount for just the month of January? Although there's not a ready-made function, like MAXIF, I can easily adapt the MAX function to accomplish this.
Continue reading on
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 or follow him on Twitter. David speaks at conferences about Microsoft Excel and presents webcasts for several CPE providers, including AccountingWEB partner CPE Link.