Difference between revisions of "Manuals/calci/SUBTOTAL"

From ZCubes Wiki
Jump to navigation Jump to search
(Created page with "<div id="16SpaceContent" align="left"><div class="ZEditBox" align="justify"> Syntax </div></div> ---- <div id="4SpaceContent" align="left"><div class="ZEditBox" align=...")
 
Line 1: Line 1:
<div id="16SpaceContent" align="left"><div class="ZEditBox" align="justify">
+
=SUBTOTAL(SomeType, SomeArray)=
  
Syntax
+
where,
 +
*<math>SomeType</math> specifies which function type to use within a list,
 +
*<math>SomeArray</math> is set of values or range of cells containing values.
  
</div></div>
+
SUBTOTAL() calculates a subtotal in a list or database.
----
 
<div id="4SpaceContent" align="left"><div class="ZEditBox" align="justify">
 
  
Remarks
+
== Description ==
  
</div></div>
+
SUBTOTAL(SomeType, SomeArray)
----
 
<div id="2SpaceContent" align="left"><div class="ZEditBox" align="justify">
 
  
Examples
+
*SUBTOTAL() function is designed for columns of data or vertical range of cells.
 +
*Argument <math>SomeType</math> specifies which function to use in calculating subtotal from the list of functions. <math>SomeType</math> can be any number between 1 to 11 (that includes hidden values) or 101 to 111 (that ignores hidden values).
 +
*Below table describes the Function Type and the number associated with it.
 +
{| class="wikitable"
 +
|-
 +
! Function Type !! Function Number(includes hidden values) !! Function Number(ignores hidden values)
 +
|-
 +
| AVERAGE || 1 || 101
 +
|-
 +
| COUNT || 2 || 102
 +
|-
 +
| COUNTA || 3 || 103
 +
|-
 +
| MAX || 4 || 104
 +
|-
 +
| MIN || 5 || 105
 +
|-
 +
| PRODUCT || 6 || 106
 +
|-
 +
| STDEV || 7 || 107
 +
|-
 +
| STDEVP || 8 || 108
 +
|-
 +
| SUM || 9 || 109
 +
|-
 +
| VAR || 10 || 110
 +
|-
 +
| VARP || 11 || 111
 +
|}
  
</div></div>
+
*<math>SomeArray</math> is an array of values or reference to cells containing values, for which the subtotal is to be calculated.
----
+
*Text values or empty cells are ignored.
<div id="8SpaceContent" align="left"><div class="ZEditBox" align="justify">'''<font face="Times New Roman">''''''''''''<font size="6"> </font>''' '''''''''</font>'''</div></div>
+
*For invalid argument values, Calci displays an error message.
----
 
<div id="11SpaceContent" align="left"><div class="ZEditBox mceEditable" align="justify">
 
  
<font size="5">Description</font>
+
== Examples ==
  
</div></div>
 
----
 
<div id="10SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">'''<font face="Times New Roman"> <font size="6">SUBTOTAL</font> </font>'''</div></div>
 
----
 
<div id="3SpaceContent" class="zcontent" align="left"><br /><div id="7Space" class="gamizbox" title="7Space"><div id="7SpaceHeader" class="zheaderstyle" title="Double-click to start and stop editing the header."><center></center></div><div id="7SpaceRollup" title="Double-click to rolldown" align="left"><span><span id="7SpaceRollupContent" align="center"></span></span></div><div id="7SpaceCover"><div id="7SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify"> 
 
 
<font color="#000000"><font face="Arial, sans-serif"><font size="2">'''SUBTOTAL'''</font></font><font face="Arial, sans-serif"><font size="2">(N</font></font><font face="Arial, sans-serif"><font size="2">'''1'''</font></font><font face="Arial, sans-serif"><font size="2">, N2, ...)</font></font></font>
 
 
</div></div>
 
----
 
<div id="13SpaceContent" class="zcontent" align="left"><br /><br /><div id="1Space" class="gamizbox" title="1Space"><div id="1SpaceHeader" class="zheaderstyle" title="Double-click to start and stop editing the header."><center></center></div><div id="1SpaceRollup" title="Double-click to rolldown" align="left"><span><span id="1SpaceRollupContent" align="center"></span></span></div><div id="1SpaceCover"><div id="1SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify"> <font color="#000000"><font face="Arial, sans-serif"><font size="2">It is generally used in columns of data. The columns can have resultant values of other functions.</font></font></font></div></div>
 
----
 
<div id="14SpaceContent" class="zcontent" align="left"><br /><br /><br /><div id="5Space" class="gamizbox" title="5Space"><div id="5SpaceHeader" class="zheaderstyle" title="Double-click to start and stop editing the header."><center></center></div><div id="5SpaceRollup" title="Double-click to rolldown" align="left"><span><span id="5SpaceRollupContent" align="center"></span></span></div><div id="5SpaceCover"><div id="5SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify"> <font color="#000000"><font face="Arial, sans-serif"><font size="2">This function calculates subtotal in the list.</font></font></font></div></div>
 
----
 
<div id="12SpaceContent" class="zcontent" align="left"><br /><br /><br /><div id="9Space" class="gamizbox" title="9Space"><div id="9SpaceHeader" class="zheaderstyle" title="Double-click to start and stop editing the header."><center></center></div><div id="9SpaceRollup" title="Double-click to rolldown" align="left"><span><span id="9SpaceRollupContent" align="center"></span></span></div><div id="9SpaceCover"><div id="9SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify"> 
 
 
<font color="#000000"><font face="Arial, sans-serif"><font size="2">'''Lets see an example,'''</font></font></font>
 
 
<font color="#000000"><font face="Arial, sans-serif"><font size="2">'''B'''</font></font></font>
 
 
<font color="#000000"><font face="Arial, sans-serif"><font size="2">'''60'''</font></font></font>
 
 
<font color="#000000"><font face="Arial, sans-serif"><font size="2">'''12'''</font></font></font>
 
 
<font color="#000000"><font face="Arial, sans-serif"><font size="2">'''120'''</font></font></font>
 
 
<font color="#000000"><font face="Arial, sans-serif"><font size="2">'''25'''</font></font></font>
 
 
<font color="#000000"><font face="Arial, sans-serif"><font size="2">'''<nowiki>=SUBTOTAL(4,B2:B5) is 120</nowiki>'''</font></font></font>
 
 
</div></div>
 
----
 
 
<div id="6SpaceContent" class="zcontent" align="left">
 
<div id="6SpaceContent" class="zcontent" align="left">
  
 
{| id="TABLE3" class="SpreadSheet blue"
 
{| id="TABLE3" class="SpreadSheet blue"
 
|- class="even"
 
|- class="even"
| class="  " |
+
| class="  " | 40
<div id="6Space_Copy" title="Click and Drag over to AutoFill other cells."></div>
+
| class="  " |  
| Column1
+
 
| class="  " | Column2
 
| class="  " | Column3
 
| class="  " | Column4
 
 
|- class="odd"
 
|- class="odd"
| class=" " | Row1
+
| class="sshl_f" | 50
| class="sshl_f" | 60
 
| class="sshl_f" | 120
 
| class="sshl_f" |
 
 
| class="sshl_f" |
 
| class="sshl_f" |
 +
 
|- class="even"
 
|- class="even"
| class="  " | Row2
+
| class="sshl_f" | 25.5
| class="sshl_f" | 12
 
| class="sshl_f       SelectTD SelectTD" |
 
<div id="6Space_Handle" title="Click and Drag to resize CALCI Column/Row/Cell. It is EZ!"></div><div id="6Space_Copy" title="Click and Drag over to AutoFill other cells."></div>
 
| class="sshl_f" |
 
 
| class="sshl_f" |
 
| class="sshl_f" |
 +
 
|- class="odd"
 
|- class="odd"
| Row3
+
| class="sshl_f" | 80
| class="sshl_f" | 120
 
| class="sshl_f" |
 
| class="sshl_f" |
 
 
| class="sshl_f" |
 
| class="sshl_f" |
 +
 
|- class="even"
 
|- class="even"
| Row4
+
| class="sshl_f" | 15.5
| class="sshl_f" | 25
 
| class="sshl_f" |
 
| class="sshl_f" |
 
 
| class="sshl_f" |
 
| class="sshl_f" |
 +
 
|- class="odd"
 
|- class="odd"
| class=" " | Row5
+
| class="sshl_f" | -2
| class="sshl_f  " |
 
<div id="6Space_Copy" title="Click and Drag over to AutoFill other cells."></div>
 
| class="sshl_f" |
 
| class="sshl_f" |
 
| class="sshl_f" |
 
|- class="even"
 
| Row6
 
| class="sshl_f" |
 
| class="sshl_f" |
 
| class="sshl_f" |
 
 
| class="sshl_f" |
 
| class="sshl_f" |
 
|}
 
|}
  
<div align="left">[[Image:calci1.gif]]</div></div>
+
=SUBTOTAL(4,A1:A6) : Calculates the subtotal of numbers in the range A1 to A6 using MAX function. Returns '''80''' as a result.
----
+
=SUBTOTAL(5,A1:A6) : Calculates the subtotal of numbers in the range A1 to A6 using MIN function. Returns '''-2''' as a result.
</div></div></div></div></div></div></div></div></div></div></div></div>
+
=SUBTOTAL(9,A1:A6) : Calculates the subtotal of numbers in the range A1 to A6 using SUM function. Returns '''209''' as a result.
 +
=SUBTOTAL(1,A1:A6) : Calculates the subtotal of numbers in the range A1 to A6 using AVERAGE function. Returns '''34.833333333333336''' as a result.
 +
 
 +
==See Also==
 +
 
 +
*[[Manuals/calci/AVERAGE | AVERAGE]]
 +
 
 +
 
 +
==References==
 +
*[http://en.wikipedia.org/wiki/Aggregate_function Aggregate Functions]

Revision as of 15:16, 2 April 2014

SUBTOTAL(SomeType, SomeArray)

where,

  • specifies which function type to use within a list,
  • is set of values or range of cells containing values.

SUBTOTAL() calculates a subtotal in a list or database.

Description

SUBTOTAL(SomeType, SomeArray)

  • SUBTOTAL() function is designed for columns of data or vertical range of cells.
  • Argument specifies which function to use in calculating subtotal from the list of functions. can be any number between 1 to 11 (that includes hidden values) or 101 to 111 (that ignores hidden values).
  • Below table describes the Function Type and the number associated with it.
Function Type Function Number(includes hidden values) Function Number(ignores hidden values)
AVERAGE 1 101
COUNT 2 102
COUNTA 3 103
MAX 4 104
MIN 5 105
PRODUCT 6 106
STDEV 7 107
STDEVP 8 108
SUM 9 109
VAR 10 110
VARP 11 111
  • is an array of values or reference to cells containing values, for which the subtotal is to be calculated.
  • Text values or empty cells are ignored.
  • For invalid argument values, Calci displays an error message.

Examples

40
50
25.5
80
15.5
-2
=SUBTOTAL(4,A1:A6) : Calculates the subtotal of numbers in the range A1 to A6 using MAX function. Returns 80 as a result.
=SUBTOTAL(5,A1:A6) : Calculates the subtotal of numbers in the range A1 to A6 using MIN function. Returns -2 as a result.
=SUBTOTAL(9,A1:A6) : Calculates the subtotal of numbers in the range A1 to A6 using SUM function. Returns 209 as a result.
=SUBTOTAL(1,A1:A6) : Calculates the subtotal of numbers in the range A1 to A6 using AVERAGE function. Returns 34.833333333333336 as a result.

See Also


References