From 5b1cb4f0bfbae734818ae791165cd1ea7ac5fdcb Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Fri, 27 May 2016 12:24:46 +0200 Subject: [PATCH] tdf#70806 DCOUNT and DCOUNTA DatabaseField argument can be omitted Change-Id: I340142fedd2239ff318c8f70fe228e696540cfdd --- source/text/scalc/01/04060101.xhp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/source/text/scalc/01/04060101.xhp b/source/text/scalc/01/04060101.xhp index 41dc0c9c05..2777a13699 100644 --- a/source/text/scalc/01/04060101.xhp +++ b/source/text/scalc/01/04060101.xhp @@ -405,7 +405,7 @@ Database is the cell range defining the database. -DatabaseField specifies the column where the function operates on after the search criteria of the first parameter is applied and the data rows are selected. It is not related to the search criteria itself. To reference a column by means of the column header name, place quotation marks around the header name. +DatabaseField specifies the column where the function operates on after the search criteria of the first parameter is applied and the data rows are selected. It is not related to the search criteria itself. For the DatabaseField parameter you can enter a reference to a header cell or a number to specify the column within the Database area, starting with 1. To reference a column by means of the literal column header name, place quotation marks around the header name. SearchCriteria is the cell range containing search criteria. If you write several criteria in one row they are connected by AND. If you write the criteria in different rows they are connected by OR. Empty cells in the search criteria range will be ignored. @@ -423,9 +423,8 @@ Syntax - DCOUNT(Database; DatabaseField; SearchCriteria) - For the DatabaseField parameter you can enter a cell to specify the column. - + DCOUNT(Database; [DatabaseField]; SearchCriteria) + If the DatabaseField argument is omitted, DCOUNT returns the count of all records that satisfy Criteria. Example In the example above (scroll up, please), we want to know how many children have to travel more than 600 meters to school. 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. @@ -445,8 +444,8 @@ Syntax - DCOUNTA(Database; DatabaseField; SearchCriteria) - + DCOUNTA(Database; [DatabaseField]; SearchCriteria) + If the DatabaseField argument is omitted, DCOUNTA returns the count of all records that satisfy Criteria. Example In the example above (scroll up, please), you can search for the number of children whose name starts with an E or a subsequent letter. Edit the formula in B16 to read =DCOUNTA(A1:E10;"Name";A13:E14). Delete the old search criteria and enter >=E under Name in field A14. The result is 5. If you now delete all number values for Greta in row 8, the result changes to 4. Row 8 is no longer included in the count because it does not contain any values. The name Greta is text, not a value. Note that the DatabaseField parameter must point to a column that can contain values.see i25407