Documentation/Calc Functions/DTÆL

From The Document Foundation Wiki
Jump to navigation Jump to search
This page is a translated version of the page Documentation/Calc Functions/DCOUNT and the translation is 62% complete.
Outdated translations are marked like this.
Other languages:
English • ‎dansk



Funktionsnavn:

DTÆL

Kategori:

Database

Resume:

DTÆL tæller antallet af rækker (poster) i en database, som matcher det bestemte søgekriterier og indeholder numeriske værdier i kolonnen databasefelt.

Syntaks:

DCOUNT(Database; [DatabaseField]; SearchCriteria)

Returnerer:

Returnerer et ikke-negativt heltal, som er antallet af rækker i databasen, der opfylder søgekriterierne i det givne databasefelt.

Argumenter:

Yderligere oplysninger:

Eksempler:


The following data will be used in some of the function description examples:

The range A1:E10 lists the children invited to Joe's birthday party. The following information is given for each entry: column A shows the name, B the grade, then age in years, distance to school in meters and weight in kilograms.

A B C D E
1 Name Grade Age Distance to School Weight
2 Andy 3 9 150 40
3 Betty 4 10 1000 42
4 Charles 3 10 300 51
5 Daniel 5 11 1200 48
6 Eva 2 8 650 33
7 Frank 2 7 300 42
8 Greta 1 7 200 36
9 Harry 3 9 1200 44
10 Irene 2 8 1000 42
11
12
13 Name Grade Age Distance to School Weight
14 >600
15
16 DCOUNT 5

The formula in cell B16 is =DCOUNT(A1:E10;D1;A13:E14)


Formula Description Returns
=DCOUNT(A1:E10;D1;A13:E14) count of rows of distance to school where distance to school is greater than 600 so we want to know how many children have to travel more than 600 meters to school. If the result is to be stored in cell B16. Set the cursor in cell B16. Enter the formula =DCOUNT(A1:E10;D1;A13:E14) in B16. The Function Wizard helps you to input ranges. Database is the range of data to be evaluated, including its headers: in this case A1:E10. DatabaseField specifies the column for the search criteria: in this case, the column with the numerical distance values. SearchCriteria is the range where you can enter the search parameters: in this case, A13:E14. 5

For at se, hvor mange børn i anden årgang, der er over 7 år gamle, sletter du indførslen >600 i celle D14 og indtaster 2 i celle B14 under Årgang og >7 i celle C14 til højre. Resultatet er 2. 2 børn går på anden årgang og er over 7 år gamle. Da begge kriterier er i den samme række, er de forbundet med OG.

For more detailed examples, download and view this Calc spreadsheet.

Beslægtede LibreOffice-funktioner:

TÆL

DTÆLV

DTÆLV

DSUM

ODF standard:

Tilsvarende Excel-funktioner:

DTÆL