![]() |
|
Formula Reference Guide |
|
|
AuguriTM Formulas
Formulas are an important part of an AuguriTM sheet. Formulas establish and calculate mathematical relationships among elements of the sheet. Cells defined by formulas are automatically changed to reflect changes in the referenced cells, even when there are complex interdependencies among cells. Numeric entries, on the other hand, remain the same until you change them.
AuguriTM formulas can perform calculations on numbers, text, logical values, cell references, and other formulas. For example, you can calculate the sum of a series of cells, the total of values in a column, a minimum or maximum value within a range, the rounded result of another formula, or the absolute value of a cell entry. Formulas can express complex interdependencies among cells, and they can define constraints on the calculation, such as limits on acceptable values or specific conditions under which a calculation should take place.
Once typed in a cell, formulas are hidden from view, perform their work in the background, and display only the result of their evaluation. To view the formula in a cell, simply select the cell for editing.
Formula Syntax
The general form of an AuguriTM formula is:
= expression // comment
Where expression defines the calculations needed to generate the value of the cell and comment is any text you want to attach to the cell. The expression part of AuguriTM formulas looks just like an algebraic formula; it contains values and operators, which define the relationships between values.
A constraint expression places limits on acceptable values or the circumstances under which the calculation should take place.
AuguriTM uses the following conventions for formulas:
0 1 2 3 4 5 6 7 8 9 . - =+
Formula Values
Formulas can contain any or all of the following types of values:
Refer to Specifying Cell Ranges and Locations for additional information on this subject.
Refer to Specifying Cell Ranges and Locations for additional information on this subject.
Formula Operators
AuguriTM supports all the arithmetic, Boolean, and logical operators available in the C programming language. It does not support the C address operators or the operators that have side effects, such as ++. AuguriTM provides two operators, exponentiation (^) and percent (%), which are not available in the C language.
Operator Precedence
In formulas with more than one operator, AuguriTM evaluates operators in the order of precedence presented above, with the highest precedence first. That is, AND/OR/NOT operators are evaluated after inequality operators in a logical expression, and multiplication/division operations are performed before subtraction/addition operations in an arithmetic expression. Operators at the same precedence level are evaluated from left to right. The precedence of operators can be overridden by using parentheses to explicitly specify the order of evaluation.
Here are some special notes about AuguriTM operators:
= SUM(A1 ? B:C20 : C10:D15)
Will return the sum of B1:C20 if A1 evaluates to non-zero; otherwise, it returns the sum of C10:D15.
Referencing Other Cells in Formulas
The real power of the formula engine lies in its ability to calculate relationships among different cells in the document worksheet. To reference other cells, type the row and column coordinates of the cell or cell range in the formula. Refer to Specifying Cell Ranges and Locations for additional information on this subject.
AuguriTM differentiates between relative, absolute, and indirect references.
Absolute Reference Absolute references remain the same, no matter where you move or copy the original formula. For example, if the formula in cell A1 references cell B2, and you move the formula in cell A1 to another location (e.g., D17), the formula will still reference the B2 cell. To specify an absolute cell or range address, just type the address of the referenced cell or range.
Relative Cell Reference Certain formula expressions require a means to reference a cell relative to the current cell. The current cell is identified in any expression with a pound sign (#). References to cells in the neighborhood of the current cell are made with offset values enclosed in braces ( {} ) following the #. The offsets tell AuguriTM where to look in relation to the current cell for the cell being referenced. The format is as follows:
#{column offset, row offset}
If you include only one value in the offset, AuguriTM assumes that it is a column offset. For example, the offset reference #{-1} tells AuguriTM to look to the column just left of the current cell. Offset values may be constants or expressions.
Examples:
#{0,-1} Refers to the cell above the current cell.
#{-2} Refers to the cell two columns left of the current cell.
#{1} Refers to the cell to the right of the current cell.
#{0,1} Refers to the cell below the current cell.
CSUM(C4..C100, #{-1} == "Joe") Calculates the sum of all the values in the range C4..C100 for which the cell in the column to the left contains the string "Joe."
CCOUNT(C4..C100, # > #{0,-1}) Counts all the cells in the range C4..C100 whose value is greater than the contents of the cell immediately above.
#{-1}+2 Adds 2 to the cell value in the cell to the left.
Alternatively, you can use the CELLREF and the RANGEREF formula functions to reference relative cells and ranges.
Constraint Expressions
Constraints are conditional expressions that can be placed in some formula functions, and that are expressed as algebraic statements. Constraint expressions establish conditions under which a formula function operates or boundaries for valid results of the function. They may be simple equality/inequality relationships, or they can be arbitrary formulas. Any valid formula expression that returns a numeric value is also a valid constraint expression. A constraint expression can reference the cell in which it resides using the symbol #. For example, the formula:
= CMAX(A1:A6, #<SUM(A11, A12)) = 56 Where A1:A6 = 4, 56, 33, 100, 0, -1, A11=50 and A12=50.
means "the value of the current cell is the maximum value in the range A1:A6 such that this value is less than the sum of cells A11 and A12".
Constraint expressions are used in several formula functions in AuguriTM, including conditional statistical functions. The benefit of constraint expressions is maximized when combined with the current cell reference symbol (#), as indicated in the above example.
You can use regular expressions to define text (non-numeric) searches. Regular expressions specify a set of strings of characters. In a regular expression, a character normally matches with the same character in the matching string. A few characters have special meanings:
These methods can be combined. Thus, the filter [brc]at finds "bat", "rat", and "cat".
|