Difference between revisions of "Documentation/How Tos/Calc: DPRODUCT function"

From Apache OpenOffice Wiki
Jump to: navigation, search
m
 
Line 1: Line 1:
{{Documentation/MasterTOC
+
{{DISPLAYTITLE: DPRODUCT function}}
|bookid=1234'''
+
{{Documentation/CalcFunc DatabaseTOC
|booktitle=<div style="padding: 8px; font-size: 140%; font-weight: bold; background-color: #9BC0F5;">CALC FUNCTIONS</div>
+
|ShowPrevNext=block
|ShowParttitle=block|parttitle=[[Documentation/How_Tos/Calc:_Database_functions|<div  style="font-size: 140%;">Database Functions]]
+
|PrevPage=Documentation/How_Tos/Calc:_DAVERAGE_function
|ShowNextPage=block|NextPage= Documentation/How_Tos/Calc:_DSTDEV_function
+
|NextPage=Documentation/How_Tos/Calc:_DSTDEV_function
|ShowPrevPage=block|PrevPage= Documentation/How_Tos/Calc:_DAVERAGE_function
+
}}__NOTOC__
|ShowPrevPart=block|PrevPart= Documentation/How_Tos/Calc:_Complex_Number_functions
+
|ShowNextPart=block|NextPart= Documentation/How_Tos/Calc:_Date_%26_Time_functions
+
|toccontent= <div style="padding: 4px; font-size: 130%; font-weight: hidden; background-color:#DCE9FC;">FUNCTIONS</div>
+
* [[Documentation/How_Tos/Calc:_DCOUNT_function|<div style="font-size: 120%;">Dcount]]
+
* [[Documentation/How_Tos/Calc:_DCOUNTA_function|<div style="font-size: 120%;">Dcounta]]
+
* [[Documentation/How_Tos/Calc:_DGET_function|<div style="font-size: 120%;">Dget]]
+
* [[Documentation/How_Tos/Calc:_DMAX_function|<div style="font-size: 120%;">Dmax]]
+
* [[Documentation/How_Tos/Calc:_DMIN_function|<div style="font-size: 120%;">Dmin]]
+
* [[Documentation/How_Tos/Calc:_DAVERAGE_function|<div style="font-size: 120%;">Daverage]]
+
* [[Documentation/How_Tos/Calc:_DPRODUCT_function|<div style="font-size: 120%; border-style: double; border-color:#778899;">Dproduct]]
+
* [[Documentation/How_Tos/Calc:_DSTDEV_function|<div style="font-size: 120%;">Dstdev]]
+
* [[Documentation/How_Tos/Calc:_DSUM_function|<div style="font-size: 120%;">Dsum]]
+
* [[Documentation/How_Tos/Calc:_DVAR_function|<div style="font-size: 120%;">Dvar]]
+
* [[Documentation/How_Tos/Calc:_DVARP_function|<div style="font-size: 120%;">Dvarp]]
+
}}__TOC__
+
 
+
  
 
== DPRODUCT  ==
 
== DPRODUCT  ==
Line 33: Line 17:
 
:<tt>'''database_table'''</tt> is a range defining the data to be processed.
 
:<tt>'''database_table'''</tt> is a range defining the data to be processed.
  
:<tt>'''field'''</tt> is the column to sum. It may be a column number (1 is the first column of the database table, 2 is the second ...) or a column header (enclosed in quotation marks ””) or a cell referring to a column header.
+
:<tt>'''field'''</tt> is the column to sum. It may be a column number (1 is the first column of the database table, 2 is the second ) or a column header (enclosed in quotation marks ””) or a cell referring to a column header.
  
 
:<tt>'''criteria_table'''</tt> is a range containing criteria, which are used to select which rows of the <tt>'''database_table'''</tt> to sum.
 
:<tt>'''criteria_table'''</tt> is a range containing criteria, which are used to select which rows of the <tt>'''database_table'''</tt> to sum.
Line 50: Line 34:
 
{| border="1"  
 
{| border="1"  
 
|-align="center"
 
|-align="center"
|&nbsp;||'''A'''||'''B'''||'''C'''||'''D'''||'''E'''
+
!&nbsp;||'''A'''||'''B'''||'''C'''||'''D'''||'''E'''
  
 
|-align="center"
 
|-align="center"

Latest revision as of 13:04, 30 January 2024



DPRODUCT

Returns the product of cells in a column of a Calc 'database' table, in rows which meet specified criteria.


Syntax:

DPRODUCT(database_table; field; criteria_table)

where

database_table is a range defining the data to be processed.
field is the column to sum. It may be a column number (1 is the first column of the database table, 2 is the second …) or a column header (enclosed in quotation marks ””) or a cell referring to a column header.
criteria_table is a range containing criteria, which are used to select which rows of the database_table to sum.


The Database functions overview describes the use of these parameters in detail.


DPRODUCT multiplies together the contents of all cells found in the field column.


Example:

In this spreadsheet:

  A B C D E
1 Box size Dimension cm   Box size
2 A width 23   C
3 A height 19    
4 A depth 35    
5 B width 35    
6 B height 35    
7 B depth 19    
8 C width 23    
9 C height 35    
10 C depth 21    
11 D width 19    
12 D height 17    
13 D depth 12    


DPRODUCT(A1:C13; "cm"; E1:E2)

returns the volume of Box C - that is, the product of all cells in the "cm" column whose Box size is C (width * height * depth = 23 * 35 * 21 = 16905).

Issues:

The OOo2.3 Help implies that 0 as a field will include the entire database table. This seems to be wrong - only a single column can be processed.



See Also
Retrieved from "https://wiki.openoffice.org/w/index.php?title=Documentation/How_Tos/Calc:_DPRODUCT_function&oldid=259671"
Views
Personal tools
Navigation
Tools