Difference between revisions of "Manuals/calci/DAVERAGE"

From ZCubes Wiki
Jump to navigation Jump to search
Line 18: Line 18:
 
*The argument 'field' is optional. If not mentioned, the function averages all the values from database that match the criteria.
 
*The argument 'field' is optional. If not mentioned, the function averages all the values from database that match the criteria.
  
* A 'column name' in quotes (e.g. "Salary") or 'column number' (e.g. 3, if Salary is 3rd column) can be used as 'field' argument.
+
* A 'column name' in quotes (e.g. "Price") or 'column number' (e.g. 3, if Price is 3rd column) can be used as 'field' argument.
  
 
*Criteria can be any range on the 'Calci' with minimum of one column and at least one row indicating the condition.
 
*Criteria can be any range on the 'Calci' with minimum of one column and at least one row indicating the condition.
Line 81: Line 81:
 
{| id="TABLE2" class="SpreadSheet blue"
 
{| id="TABLE2" class="SpreadSheet blue"
 
|- class="even"
 
|- class="even"
| class="sshl_f" | '''Stationary Items'''
+
| class="sshl_f" | '''Item'''
| class="sshl_f" | '''Count'''
+
| class="sshl_f" | '''Quantity'''
 
| class="sshl_f" | '''Price'''
 
| class="sshl_f" | '''Price'''
| class="sshl_f" | '''Profit'''
+
| class="sshl_f" | '''% Profit'''
  
 
|- class="odd"
 
|- class="odd"
 
| class="sshl_f" | Pen
 
| class="sshl_f" | Pen
| class="sshl_f" | <30
 
 
| class="sshl_f" | >10
 
| class="sshl_f" | >10
 +
| class="sshl_f" |
 
| class="ssh1_f" |  
 
| class="ssh1_f" |  
  
 
|- class="even"
 
|- class="even"
| class="sshl_f" | '''Stationary Items'''
+
| class="sshl_f" | '''Item'''
| class="sshl_f" | '''Count'''
+
| class="sshl_f" | '''Quantity'''
 
| class="sshl_f" | '''Price'''
 
| class="sshl_f" | '''Price'''
| class="sshl_f" | '''Profit'''
+
| class="sshl_f" | '''% Profit'''
  
 
|- class="odd"
 
|- class="odd"

Revision as of 15:27, 11 November 2013

DAVERAGE(database,field,criteria)

  • Where 'database' is the range of cells that makes up the list or database
  • 'field' shows which column is used in the function and
  • 'criteria' is the range of cells that contains the specified criteria.
  • DAVERAGE() averages the values in a column of a list or database that match the specified criteria.


Description

DAVERAGE(database, field, criteria)

It averages the values in a column of a list or database that match the specified condition.

  • The argument 'field' is optional. If not mentioned, the function averages all the values from database that match the criteria.
  • A 'column name' in quotes (e.g. "Price") or 'column number' (e.g. 3, if Price is 3rd column) can be used as 'field' argument.
  • Criteria can be any range on the 'Calci' with minimum of one column and at least one row indicating the condition.
  • The Criteria columns should not overlap the list of data.
  • DCOUNT() can be used to count the cells having numbers from a list or database that match a specified criteria.
  • DCOUNTA() can be used to count the number of non-blank cells from a list of database that match a specified criteria.

Examples

Consider the following table with Stationary Items, Count, Price and Profit.

Item Quantity Price % Profit
Pen >10
Item Quantity Price % Profit
Pen 10 40 10
Pencil 20 30 15
Books 15 75 20
Pen 30 50 48.3333