Microsoft Office Tutorials and References
In Depth Information
Counting Only What Matters with DCOUNT
Note that DCOUNT requires a column of numbers to count. Therefore, the
Final Grade heading is put in the function. Counting on Class or Teacher
would result in zero. Using a column that specifically has numbers may seem
a little odd. The function is not summing the numbers; it just counts the
number of records. But what the heck? It works.
Now take this a step further. How about counting the number of students
who got a grade of 90 or better in any class? How can this be done? This
calculation requires a different criterion — one that selects all records where
Final Grade is 90 or greater. Figure 17-11 shows a worksheet with this
criterion and the calculated result shown.
a grade of
90 or better.
The result in cell F6 concatenates — that is, combines but does not add — the
answer from the DCOUNT function with some text. The formula looks like this:
=DCOUNT(Students,”Final Grade”,F2:F3) & “ students
received a 90 or better.”