Microsoft Office Tutorials and References
In Depth Information
Going for the Count
Figure 9-23 shows a list of popular movies along with the sales figure and the
year for each movie. Cell F5 displays the count of movies, returned with the
COUNT function. The formula in cell F5 is =COUNT(C5:C329).
Note that the range entered in the function looks at the sales figures for the
movies. This is intentional. Sales figures are numeric. If COUNT used the
range of movie titles, in Column B, the count would be 0 because this column
contains text data.
The COUNTIF function is handy when you need to count how many items are
in a list that meet a certain condition. In Figure 9-23, cell F7 shows the count of
movies made in 2002. The formula in cell F7 is =COUNTIF(D5:D329,2002).
The COUNTIF function takes two arguments:
✓ The range address of the list to be counted
✓ The criterion
Table 9-1 presents some examples of criteria for the COUNTIF function.