Monday, 15 July 2013

DCount Function in Excel

DCount Function :
The DCOUNT function In Microsoft Excel,  returns the number of cells in a column or database that contains numbers and meets a given criteria.

Syntax :
= DCOUNT( range, field, criteria )

Range -  is the range of cells that you want to apply the criteria against.

Field - is the column to count the values. You can either specify the numerical position of the column in the list or the column label in double quotation marks.

Criteria - is the range of cells that contains your criteria.

Example :
Suppose we have the data in excel at Range '$A$1:$D$6' , and the Criteria is at the Range '$A$9:$B$10' as Shown below


Order_ID
Quantity
Unit_Cost
Total Cost
1234567
3
25
75
1234568
6
10
60
1234569
2
35
70
1234570
5
15
75
1234571
4
20
80
Count based on Criteria
Quantity
Unit_Cost
DCOUNT Formula
Result
<5
 <=25
 'Count Specified Column Name
=DCOUNT($A$1:$D$6,"Order_ID",$A$9:$B$10)
2
<5
 <=25
 'Count Specified Column Number
 =DCOUNT($A$1:$D$6,1,$A$9:$B$10)
2



Note:
The Dcount Function as we discussed counts only numbers which meets the criteria , so that every time I take only 'Marks' Column , which is the only numbers column here to find count.
Student Id column is also a Numbers column but we do not specify any criteria on that.


Thanks.,

TPR

No comments:

Post a Comment

Follow Me by Email

ExcelKingdom-Popular Posts

ExcelKingdom-Random Posts