Difference between revisions of "Manuals/calci/DAVERAGE"

From ZCubes Wiki
Jump to navigation Jump to search
Line 29: Line 29:
  
 
*DCOUNTA() can be used to count the number of non-blank cells from a list of 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.
 
<!--
 
<div id="8SpaceContent" class="zcontent" align="left"> 
 
 
<u>[javascript:ToggleDiv('divExpCollAsst_4') <font color="#0000ff">Let's see an example</font>]</u>
 
 
<font color="#0000ff"><br /></font>
 
 
[javascript:ToggleDiv('divExpCollAsst_4') <u><font color="#0000ff">C1 C2 C3 C4 </font></u>]
 
 
<font color="#0000ff"><br /></font>
 
 
[javascript:ToggleDiv('divExpCollAsst_4') <u><font color="#0000ff">R1 Stationary Items Count Price Profit</font></u>]
 
 
<font color="#0000ff"><br /></font>
 
 
<font color="#0000ff"><br /></font>
 
 
[javascript:ToggleDiv('divExpCollAsst_4') <u><font color="#0000ff">R2 Pen 10 40 10</font></u>]
 
 
<font color="#0000ff"><br /></font>
 
 
<font color="#0000ff"><br /></font>
 
 
[javascript:ToggleDiv('divExpCollAsst_4') <u><font color="#0000ff">R3 Pencil 20 30 15</font></u>]
 
 
<font color="#0000ff"><br /></font>
 
 
<font color="#0000ff"><br /></font>
 
 
[javascript:ToggleDiv('divExpCollAsst_4') <u><font color="#0000ff">R4 Books 15 75 20</font></u>]
 
 
<font color="#0000ff"><br /></font>
 
 
<font color="#0000ff"><br /></font>
 
 
<font color="#0000ff"><br /></font>
 
 
<font color="#0000ff"><br /></font>
 
 
<font color="#0000ff"><br /></font>
 
 
[javascript:ToggleDiv('divExpCollAsst_4') <u><font color="#0000ff">I.e. =DAVERAGE(C1R1:C4R6,3,C1R1:C4R4) is 48.333(average price of the items)</font></u>]
 
 
</div>
 
-->
 
  
 
== Examples ==
 
== Examples ==

Revision as of 15:55, 23 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.

  • A 'field' argument can be expressed as "Price" (a column name) or 3 (position of column number).
  • 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.
  • To calculate the average of all values of certain column, the database range should be used as a criteria argument.

For Example considering below table,

DAVERAGE(A3:D7,"Profit",A3:D7) returns 3 as a result.

  • 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, Quantity, Price and Percentage Profit.

Item Quantity Price Profit
Pen >10
Item Quantity Price Profit
Pen 12 40 2
Pencil 20 20 1
Books 25 75 5
Pen 30 93.33 4


= DAVERAGE(A3:D7,"Price",A1:B2) : Calculates the average price of Pens in the range A3 to D7, for the cells with Quantity>10. Returns 66.66499999999999 as a result.

= DAVERAGE(A3:D7,2,A1:B2) : Calculates the average number of Pens in the range A3 to D7, for the cells with Quantity>10. Returns 21 as a result.

= DAVERAGE(A3:D7,"Quantity",A3:D7) : Calculates the average number of all items in the range A3 to D7. Returns 21.75 as a result.

= DAVERAGE(A3:D7,4,A3:D7) : Calculates the average of percentage profit of all the items in the range A3 to D7. Returns 3 as a result.

See Also

References