Sie sind auf Seite 1von 3

DGET Function Overview

The DGET function is one of Excel's database functions. This group of functions is designed to make it easy to summarize information from large tables of data. They do this by returning specific information based on one or more criteria chosen by the user. The DGET function can be used to return a single field of data from a column of a database that matches conditions that you specify. DGET is similar to the VL !"# function $hich can also be used to return single fields of data.

DGET Syntax and Arguments


The syntax for the DGET function is% & DGET ' database( field( criteria ) *ll database functions ha+e the same three arguments% Database% 're,uired) -pecifies the range of cell references containing the database. The field names must be included in the range. Field% 're,uired) .ndicates $hich column or field is to be used by the function in its calculations. Enter the argument either by typing the field name / such as #Orders / or enter the column number / such as 0. Criteria% 're,uired) Lists the range of cells containing the conditions specified by the user. The range must include at least one field name from the database and at least one other cell reference indicating the condition to be e+aluated by the function.

Example Using Excel s DGET Function ! "atc#ing a Single Criterion


1lick on the image abo+e for a larger +ie$ of this example. This example $ill use DGET to find the number of sales orders placed by a specific sales agent for a gi+en month.

Entering t#e Tutorial Data


$ote% The tutorial does not include formatting steps. .nformation on $orksheet formatting options is a+ailable in this 2asic Excel 3ormatting Tutorial.

4.

Enter the data table as seen in the image abo+e into cells D4 to 340

5.

Lea+e cell E6 blank / this is $here the DGET formula $ill be located

0.

The field names in cells D5 to 35 $ill be used as part of the function's Criteria argument

Selecting t#e Criteria


To get DGET to only look at data for a specific sales rep $e enter the name of an agent under the SalesRep field name in ro$ 0. 4. .n cell 30 type the criteria Harry

5.

.n cell E6 type the heading #Orders: to indicate the information $e $ill be finding $ith DGET

$aming t#e Database


"sing a named range for large ranges of data such as a database can not only make it easier to enter this argument into the function( but it can also pre+ent errors caused by selecting the $rong range. 7amed ranges are +ery useful if you use the same range of cells fre,uently in calculations or $hen creating charts or graphs.

1. 2.
0.

8ighlight cells D9 to 340 in the $orksheet to select the range

1lick on the name box abo+e column * in the $orksheet

Type SalesData into the name box to create the named range

:.

#ress the Enter key on the keyboard to complete the entry

Opening t#e DGET Dialog &ox


* function's dialog box pro+ides an easy method for entering data for each of the function's arguments. pening the dialog box for the database group of functions is done by clicking on the function $izard button 'fx) located next to the formula bar abo+e the $orksheet / see image abo+e. 4. 1lick on cell E6 / the location $here the results of the function $ill be displayed

5.

1lick on the function $izard button 'fx) to bring up the Insert Function dialog box

0.

Type DGET in the Search for a function $indo$ at the top of the dialog box

:.

1lick on the GO button to search for the function

6.

The dialog box should find DGET and list it in the Select a function $indo$

;.

1lick

! to open the DGET function dialog box

Completing t#e Arguments


4. 1lick on the Database line of the dialog box

5.

Type the range name SalesData into the line

0.

1lick on the Field line of the dialog box

:.

Type the field name #Orders into the line

6.

1lick on the Criteria line of the dialog box

6.
9.

8ighlight cells D5 to 30 in the $orksheet to enter the range

1lick

! to close the DGET function dialog box and complete the function

<.

The ans$er '() should appear in cell E6 as this is the number of sales orders placed by 8arry this month

=.

>hen you click on cell E6 the complete function *DGET+SalesData, -.Orders-, D'%F/0 appears in the formula bar abo+e the $orksheet

Database Function Errors


.1alue% ccurs most often $hen the field names $ere not included in the database argument. 3or the example abo+e( be sure that the field names in cells D;%3; $ere included in the named range SalesData.

Das könnte Ihnen auch gefallen