Difference between revisions of "Documentation/How Tos/Calc: DPRODUCT function"
From Apache OpenOffice Wiki
< Documentation | How Tos
(→See also:) |
OOoWikiBot (Talk | contribs) m (Robot: Automated text replacement %s) |
||
Line 17: | Line 17: | ||
− | :The | + | :The * [[Documentation/How_Tos/Calc: Database functions|Database functions overview]]''' describes the use of these parameters in detail. |
Line 29: | Line 29: | ||
{| border="1" | {| border="1" | ||
|-align="center" | |-align="center" | ||
− | | || | + | | ||A'''||B'''||C'''||D'''||E''' |
|-align="center" | |-align="center" | ||
− | | | + | |1'''||Box size||Dimension||cm|| ||Box size |
|-align="center" | |-align="center" | ||
− | | | + | |2'''||A||width||23|| ||C |
|-align="center" | |-align="center" | ||
− | | | + | |3'''||A||height||19|| || |
|-align="center" | |-align="center" | ||
− | | | + | |4'''||A||depth||35|| || |
|-align="center" | |-align="center" | ||
− | | | + | |5'''||B||width||35|| || |
|-align="center" | |-align="center" | ||
− | | | + | |6'''||B||height||35|| || |
|-align="center" | |-align="center" | ||
− | | | + | |7'''||B||depth||19|| || |
|-align="center" | |-align="center" | ||
− | | | + | |8'''||C||width||23|| || |
|-align="center" | |-align="center" | ||
− | | | + | |9'''||C||height||35|| || |
|-align="center" | |-align="center" | ||
− | | | + | |10'''||C||depth||21|| || |
|-align="center" | |-align="center" | ||
− | | | + | |11'''||D||width||19|| || |
|-align="center" | |-align="center" | ||
− | | | + | |12'''||D||height||17|| || |
|-align="center" | |-align="center" | ||
− | | | + | |13'''||D||depth||12|| || |
|} | |} | ||
Line 78: | Line 78: | ||
− | + | {{Documentation/SeeAlso| | |
− | + | * [[Documentation/How_Tos/Calc: DCOUNT function|DCOUNT]] | |
− | + | * [[Documentation/How_Tos/Calc: DCOUNTA function|DCOUNTA]] | |
− | + | * [[Documentation/How_Tos/Calc: DSUM function|DSUM]] | |
− | + | * [[Documentation/How_Tos/Calc: DMAX function|DMAX]] | |
− | + | * [[Documentation/How_Tos/Calc: DMIN function|DMIN]] | |
− | + | * [[Documentation/How_Tos/Calc: DAVERAGE function|DAVERAGE]] | |
− | + | * [[Documentation/How_Tos/Calc: DSTDEV function|DSTDEV]] | |
− | + | * [[Documentation/How_Tos/Calc: DSTDEVP function|DSTDEVP]] | |
− | + | * [[Documentation/How_Tos/Calc: DVAR function|DVAR]] | |
− | + | * [[Documentation/How_Tos/Calc: DVARP function|DVARP]] | |
− | + | * [[Documentation/How_Tos/Calc: DGET function|DGET]]''' | |
− | + | * [[Documentation/How_Tos/Calc: PRODUCT function|PRODUCT]]''' | |
− | + | * [[Documentation/How_Tos/Calc: Database functions#Overview|Database functions overview]]''' | |
− | + | * [[Documentation/How_Tos/Calc: Database functions|Database functions]]''' | |
− | [[Documentation/How_Tos/Calc: Functions listed alphabetically| | + | * [[Documentation/How_Tos/Calc: Functions listed alphabetically|Functions listed alphabetically]] |
− | [[Documentation/How_Tos/Calc: Functions listed by category| | + | * [[Documentation/How_Tos/Calc: Functions listed by category|Functions listed by category]]}} |
==Issues== | ==Issues== | ||
The OOo2.3 Help implies that <tt>'''0'''</tt> as a <tt>'''field'''</tt> will include the entire database table. This seems to be wrong - only a single column can be processed. | The OOo2.3 Help implies that <tt>'''0'''</tt> as a <tt>'''field'''</tt> will include the entire database table. This seems to be wrong - only a single column can be processed. |
Revision as of 13:44, 25 February 2009
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).
Template:Documentation/SeeAlso
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.