Overview of this book

Excel is a popular program. Millions of people throughout the world use it on a regular basis. But it’s a safe bet that the vast majority of users have yet to discover some of the amazing things this product can do. 101 Excel 2013 Tips, Tricks, & Timesavers?is packed with information that you need to know in order to confidently and seamlessly master the challenges that come with using Excel! Excel 2013 is excellent, but there's lots to learn to truly excel at Excel! In this latest addition to his popular Mr. Spreadsheet's Bookshelf series, John Walkenbach, aka "Mr. Spreadsheet," shares new and exciting ways to accomplish and master all of your spreadsheet tasks. From taming the Ribbon bar to testing and tables, creating custom functions, and overcoming "impossible" charts, mixing nesting limits, and more,?101 Excel 2013 Tips, Tricks, & Timesavers?will save you time and help you avoid common spreadsheet stumbling blocks.

Tip 44: Counting Nonduplicated Entries in a Range

In some situations, you may need to count the number of nonduplicated entries in a range. Figure 44-1 shows an example. Column A has a list of animals, and the goal is to count the number of different animals in the list. The formula in cell B2 returns 6, which is the number of nonduplicated animals. This formula (an array formula, by the way) is

`=SUM(1/COUNTIF(A1:A10,A1:A10))`

To adapt this formula to your own worksheet, just change both instances of A1:A10 to the range address that you’re working with.

When you enter an array formula, press Ctrl+Shift+Enter (not just Enter).

Figure 44-1: Use an array formula to count the number of nonduplicated entries in a range.

This formula is one of those “Internet classics” that is passed around on various websites and newsgroups. Credit goes to David Hager, who first came up with the formula.

The preceding array formula works fine unless...