You are on page 1of 10

Database Functions

The Excel Database Functions have been provided to help you to work with a database - ie. a large
number of data records, stored in Excel.

The database functions perform basic operations, such as sum, average, count, etc, but they include
criteria arguments, which enable you to only include some of the records from your database in the
calculation. Other records in the database are ignored.

The current, built-in Excel Database Functions are listed in the table below. Select one of function
names, to go to a full description of the function with examples of use.

Excel Database Functions


The Excel Database Functions are designed to assist you when working with an Excel database.
This typically takes the form of a large table of data, where each row in the table stores an
individual record.

Each column in the spreadsheet table stores a different field (or type of information) for each
record.

The database functions perform basic operations, such as count, max, min, etc, but they enable the
user to specify criteria, so that the operation is performed on selected records only. Other records
in the data

Dsum function
The Excel Dsum function calculates the sum of a field (column) in a database for selected records,
that satisfy user-specified criteria.

The function is very similar to the Excel Sumifs function, which was first introduced in Excel
2007.

The syntax of the Excel Dsum function is :


DSUM( database, field, criteria )

where the arguments are:

A range of cells containing the database. The top row of the database should specify the field
database -
names.

The field (column) within the database, that is to be summed.


field -
This can either be a field number, or can be the field name (ie. the header in the top row
of the database) encased in quotes (eg. "Area", "Quarter", etc)
A range of cells that contain the criteria, to specify which records should be included in the
calculation.
criteria -
The range can include one or more criteria, which are presented as a field name in one
cell and the condition for that field in the cell below.
Dmax Function
The Excel Dmax function finds the maximum value in a field (column) in a database for selected
records only. The records to be included in the calculation are defined by a set of one or more user-
specified criteria.

The syntax of the function is :


DMAX( database, field, criteria )

where the arguments are shown in the table below:

A range of cells containing the database. The top row of the database should specify the
database -
field names.
The field (column) within the database, that you want the maximum of.
field - This can either be a field number, or can be the field name (ie. the header in the top row
of the database) encased in quotes (eg. "Area", "Quarter", etc)
A range of cells that contain the criteria, to specify which records should be included in
the calculation.
criteria -
The range can include one or more criteria, which are presented as a field name in one
cell and the condition for that field in the cell below.
Dmin function
The Excel Dmin function finds the minimum value in a field (column) in a database for selected
records only. The records to be included in the calculation are defined by a set of one or more user-
specified criteria.

The syntax of the function is :

DMIN( database, field, criteria )

where the arguments are shown in the table below:

A range of cells containing the database. The top row of the database should specify the
database -
field names.
The field (column) within the database, that you want the minimum of.
field - This can either be a field number, or can be the field name (ie. the header in the top row
of the database) encased in quotes (eg. "Area", "Quarter", etc)
A range of cells that contain the criteria, to specify which records should be included in
the calculation.
criteria -
The range can include one or more criteria, which are presented as a field name in one
cell and the condition for that field in the cell below.
Daverage function
The Excel Daverage function calculates the average of values in a field (column) in a database for
selected records, that satisfy user-specified criteria.

The function is very similar to the Excel Averageifs function, which was first introduced in Excel
2007.

The syntax of the Excel Daverage function is :

DAVERAGE( database, field, criteria )

where the arguments are shown in the table below:

A range of cells containing the database. The top row of the database should specify the field
database -
names.

The field (column) within the database, for which the average is to be calculated.
field -
This can either be a field number, or can be the field name (ie. the header in the top row
of the database) encased in quotes (eg. "Area", "Quarter", etc)
A range of cells that contain the criteria, to specify which records should be included in the
calculation.
criteria -
The range can include one or more criteria, which are presented as a field name in one
cell and the condition for that field in the cell below.
Dcount function
The Excel Dcount function returns the number of cells containing numbers, in a field (column) of a
database for selected records only.

The records to be included in the count are those that satisfy a set of one or more user-specified
criteria.

The function is very similar to the Excel Countifs function, which was introduced as a new
function in Excel 2007.

The syntax of the Excel Dcount function is :


DCOUNT( database, [field], criteria )

where the arguments are shown in the table below:

A range of cells containing the database. The top row of the database should specify the field
database -
names.

An optional argument which specifies the field (column) within the database for which you want
to return the count.

[field] - This can either be a field number, or can be the field name (ie. the header in the top row
of the database) encased in quotes (eg. "Gender", "Subject", etc)

If the [field] argument is omitted, the Dcount function simply returns the count of all records that
satisfy the supplied criteria.

A range of cells that contain the criteria, to specify which records should be included in the
calculation.
criteria -
The range can include one or more criteria, which are presented as a field name in one
cell and the condition for that field in the cell below.
Dproduct function
The Excel Dproduct function calculates the product of a field (column) in a database for selected
records, that satisfy user-specified criteria.

The syntax of the function is:

DPRODUCT( database, field, criteria )

where the arguments are shown in the table below:

A range of cells containing the database. The top row of the database should specify the
database -
field names.
The field (column) within the database, that you want to calculate the product of.
field - This can either be a field number, or can be the field name (ie. the header in the top row
of the database) encased in quotes (eg. "Date", "Type", etc)
A range of cells that contain the criteria, to specify which records should be included in
the calculation.
criteria -
The range can include one or more criteria, which are presented as a field name in one
cell and the condition for that field in the cell below.

You might also like