DCOUNT in Excel (Formula, Examples) - How To Use DCOUNT Function
DCOUNT in Excel (Formula, Examples) - How To Use DCOUNT Function
(https://www.educba.
By
com/excel/) Arun Gupta (https://www.educba.com/author/arun-gupta/)
(https://www.educba.com/excel- (https://www.educba.com/excel-
frequency-distribution/) min-function/)
This website or its third-party tools use cookies, which are necessary to its functioning
and required to achieve the purposes illustrated in the cookie policy. By closing this
banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree
to our Privacy Policy (https://www.educba.com/privacy-policy/?source=popup)
DCOUNT in Excel
which contains only numbers or numerical values. The selected range for Database in the syntax
can be a table or column. Fields part is optional, but here we can select the column whose value
we need to count and then for Criteria part range those cell which has criteria. We need to
Database: The Range of cells that the user selected for applying criteria against. The field
name must be there in the database. It is a mandatory field.
Field: The column name or the column number which tell excel which column in the database
to count. It will be from the database only. It can be a field number / Index number. It can be
Note: The DCOUNT function is not case-sensitive. So, if the user provides data opposite case to
the database, it will not affect the result of the function.
This websiteYou
or can download this
its third-party DCOUNT
tools Function Excel
use cookies, which Template here – DCOUNT
are necessary Function
to its functioning
and requiredExcel Template the purposes illustrated in the cookie policy. By closing this
to achieve
banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree
to our Privacy Policy (https://www.educba.com/privacy-policy/?source=popup)
Example #1
A user wants to calculate the total order made after Order id 11450 for Coke.
Pre-requisite: There is a list of order Id’s, Beverage Name and Expense on a beverage made by
some customer. Criteria are written for the same on the top row for which the user wants to count
total order.
(https://www.educba.
com/excel/)
This website or its third-party tools use cookies, which are necessary to its functioning
and required to achieve the purposes illustrated in the cookie policy. By closing this
banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree
to our Privacy Policy (https://www.educba.com/privacy-policy/?source=popup)
Step 2: Select the database, which is first asked in function, so select B4 to D10.
16 Online Courses | 23 Hands-on Projects | 140+ Hours | Verifiable Certificate of Completion | Lifetime Access
₹2999 ₹27999
View Course
(https://www.educba.com/excel/courses/excel-advanced-course/?btnz=edu-blg-inline-
(https://www.educba.
banner1)
com/excel/)
Related Courses
Excel for Marketing Training (8 Courses, 13+ Projects) (https://www.educba.com/excel/courses/excel-
for-marketing-course/?btnz=edu-blg-inline-banner1)
This website or its third-party tools use cookies, which are necessary to its functioning
and required to achieve the purposes illustrated in the cookie policy. By closing this
banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree
to our Privacy Policy (https://www.educba.com/privacy-policy/?source=popup)
Step 3: Now enter the field value or column name for which a user wants to count all cell.
(https://www.educba.
com/excel/)
Step 4: Enter the criteria for which the user wants to apply to the database.
This website or its third-party tools use cookies, which are necessary to its functioning
and required to achieve the purposes illustrated in the cookie policy. By closing this
banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree
to our Privacy Policy (https://www.educba.com/privacy-policy/?source=popup)
Step 5: Click Enter, the function will be applied to the dataset, and the result will be displayed.
(https://www.educba.
com/excel/)
As we can see from the result, there is only one order: the Order ID is >11458 and Name =Coke.
A user can modify the criteria and can fetch data from the database according to his criteria given
to the
This DCOUNT
website function
or its in a fraction
third-party of seconds.
tools use cookies, which are necessary to its functioning
and required to achieve the purposes illustrated in the cookie policy. By closing this
banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree
Example #2
to our Privacy Policy (https://www.educba.com/privacy-policy/?source=popup)
A user wants to calculate the total Product ID, which is Green in color and Price greater than 5
lakhs.
Pre-requisite: There is a list of Product Id, Color description, per item price, quantity and price tag
on the product purchased by a customer. Criteria are written for the same on the top row for which
the user wants to count total items.
(https://www.educba.
com/excel/)
This website or its third-party tools use cookies, which are necessary to its functioning
and required to achieve the purposes illustrated in the cookie policy. By closing this
banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree
to our Privacy Policy (https://www.educba.com/privacy-policy/?source=popup)
Step 2: Select the database, which is first asked in function, so select B4 to F12.
(https://www.educba.
com/excel/)
Step 3: Now enter the field value or column name for which a user wants to count all cell.
This website or its third-party tools use cookies, which are necessary to its functioning
and required to achieve the purposes illustrated in the cookie policy. By closing this
banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree
to our Privacy Policy (https://www.educba.com/privacy-policy/?source=popup)
Step 4: Enter the criteria for which the user wants to apply to the database.
(https://www.educba.
com/excel/)
Step 5: Click Enter, the function will be applied to the dataset, and the result will be displayed.
This website or its third-party tools use cookies, which are necessary to its functioning
and required to achieve the purposes illustrated in the cookie policy. By closing this
banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree
to our Privacy Policy (https://www.educba.com/privacy-policy/?source=popup)
As we can see from the result, there 3 Product ID which color Red and the Total Price is >500000.
A user can modify the criteria and can fetch data from the database according to his criteria given
Example #3
(https://www.educba.
com/excel/)
A user wants to calculate the total employee with a salary greater than 6 Lakhs and older than 30
years or whose name starts with the alphabet M and younger than 21 Year.
Pre-requisite: A user has data for some XYZ Company employee data, which have field name like
First Name, age, salary and joining date.
Criteria are written for the same on the top row for which the user wants to count total items.
This website or its third-party tools use cookies, which are necessary to its functioning
and required to achieve the purposes illustrated in the cookie policy. By closing this
banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree
to our Privacy Policy (https://www.educba.com/privacy-policy/?source=popup)
This website or its third-party tools use cookies, which are necessary to its functioning
and required to achieve the purposes illustrated in the cookie policy. By closing this
banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree
to our Privacy Policy (https://www.educba.com/privacy-policy/?source=popup)
Step 2: Select the entire database, which is first asked in the DCOUNT function, so select B5 to
E17.
(https://www.educba.
com/excel/)
This website or its third-party tools use cookies, which are necessary to its functioning
Step
and 3: Now to
required DCOUNT
achievefunction will ask for
the purposes a field name
illustrated which
in the we can
cookie omit,By
policy. soclosing
a user can skip the
this
banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree
field name value and just put a sing comma (,).
to our Privacy Policy (https://www.educba.com/privacy-policy/?source=popup)
(https://www.educba.
com/excel/)
This website or its third-party tools use cookies, which are necessary to its functioning
Step
and 4: Enterto
required theachieve
criteria for
thewhich user wants
purposes to apply
illustrated on the
in the database,
cookie which
policy. written on
By closing top of
this
banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree
the database.
to our Privacy Policy (https://www.educba.com/privacy-policy/?source=popup)
(https://www.educba.
com/excel/)
This website or its third-party tools use cookies, which are necessary to its functioning
Step
and 5: Click to
required Enter, the function
achieve will be applied
the purposes to theindataset,
illustrated and the
the cookie resultBy
policy. will be displayed.
closing this
banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree
to our Privacy Policy (https://www.educba.com/privacy-policy/?source=popup)
(https://www.educba.
com/excel/)
This website or its third-party tools use cookies, which are necessary to its functioning
Summary
and of to
required Example #3:the purposes illustrated in the cookie policy. By closing this
achieve
banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree
to our Privacy Policy (https://www.educba.com/privacy-policy/?source=popup)
The user wants to calculate the total employee with a salary greater than 6 Lakhs and older than
30 years or whose name starts with the alphabet M and younger than 21 Year. The same result is
displaying in the resultant cell.
A user can modify the criteria and can fetch data from the database according to his criteria given
Field by Name: As we have used in the above example, we have given the field a name.
Field by Index: A user can give an index name or just a column number.
This website or its third-party tools use cookies, which are necessary to its functioning
and required to achieve the purposes illustrated in the cookie policy. By closing this
banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree
to our Privacy Policy (https://www.educba.com/privacy-policy/?source=popup)
The database and criteria must have the same matching header; otherwise, it will not
execute the function.
The field value can be Name in double quotes (” Name”) or field value index number.
If criteria in function left blank, then it will throw a #Value error.
The criteria can be put anywhere in the active sheet. Best to put on top of the database.
Always make sure the database and criteria or not overlap; there should be at least one-row
gap in between.
Recommended Articles
This has been a guide to DCOUNT in Excel. Here we discuss the DCOUNT Formula in Excel and
How to use the DCOUNT Function in Excel, along with practical examples and a downloadable
, g p p
excel template. You can also go through our other suggested articles –
(https://www.educba.
1. Excel Count Function (https://www.educba.com/count-in-excel/)
com/excel/)
2. COUNTIF Excel Function (https://www.educba.com/countif-function-in-excel/)
3. Count Cells with Text in Excel (https://www.educba.com/count-cells-with-text-in-excel/)
(https://www.educba.com/excel/courses/excel-vba-certification-course/?btnz=edu-blg-inline-
banner3)
About Us
// / /
Blog (https://www.educba.com/blog/?source=footer)
Contact Us (https://www.educba.com/contact-us/?source=footer)
Reviews (https://www.educba.com/excel/reviews/?source=footer)
Apps
Android (https://play.google.com/store/apps/details?id=com.educba.www)
Resources
Certification Courses
// / / /
All Courses (https://www.educba.com/excel/courses/?source=footer)
© 2022 - EDUCBA. ALL RIGHTS RESERVED. THE CERTIFICATION NAMES ARE THE
TRADEMARKS OF THEIR RESPECTIVE OWNERS.