Документ взят из кэша поисковой машины. Адрес оригинального документа : http://uneex.lorien.cs.msu.su/static/GnumericDoc_ru/r3224.html
Дата изменения: Mon Sep 26 12:35:55 2011
Дата индексирования: Tue Oct 2 07:19:43 2012
Кодировка: UTF-8
DGET

DGET

Name

DGET -- 

Synopsis

DGET(database,field,criteria)

Description

DGET function returns a single value from a column that match conditions specified.

@database is a range of cells in which rows of related information are records and columns of data are fields. The first row of a database contains labels for each column.

@field specifies which column is used in the function. If @field is an integer, for example. 2, the second column is used. Field can also be the label of a column. For example, ``Age'' refers to the column with the label ``Age'' in @database range.

@criteria is the range of cells which contains the specified conditions. The first row of a @criteria should contain the labels of the fields for which the criterias are for. Cells below the labels specify conditions, for example, ``>3'' or ``<9''. Equality condition can be given simply by specifing a value, e.g. ``3'' or ``John''. Each row in @criteria specifies a separate condition, i.e. if a row in @database matches with one of the rows in @criteria then that row is counted in (technically speaking boolean OR between the rows in @criteria). If @criteria specifies more than one columns then each of the conditions in these columns should be true that the row in @database matches (again technically speaking boolean AND between the columns in each row in @criteria).

Examples

Let us assume that the range A1:C7 contain the following values:

Name Age Salary

John 34 54342

Bill 35 22343

Clark 29 34323

Bob 43 47242

Susan 37 42932

Jill 45 45324

In addition, the cells A9:B11 contain the following values:

Age Salary

<30

>40 >46000

If none of the items match the conditions, DGET returns #VALUE! error. If more than one items match the conditions, DGET returns #NUM! error.

Examples

DGET(A1:C7, "Salary", A9:A10) equals 34323.

DGET(A1:C7, "Name", A9:A10) equals "Clark".

See also

DCOUNT.