Difference between revisions of "Documentation/How Tos/Calc: CURRENT function"

From Apache OpenOffice Wiki
Jump to: navigation, search
m (expanded for clarity.)
Line 1: Line 1:
__NOTOC__
+
{{Documentation/MasterTOC
 +
|bookid=1234'''
 +
|booktitle=<div style="padding: 8px; font-size: 140%; font-weight: bold; background-color: #9BC0F5;">CALC FUNCTIONS</div>
 +
|ShowParttitle=block|parttitle=[[Documentation/How_Tos/Calc:_Information_functions|<div style="font-size: 140%;">Information Functions]]
 +
|ShowNextPage=block|NextPage=Documentation/How_Tos/Calc:_FORMULA_function
 +
|ShowPrevPage=block|PrevPage=Documentation/How_Tos/Calc:_CELL_function
 +
|ShowPrevPart=block|PrevPart=Documentation/How_Tos/Calc:_Financial_functions
 +
|ShowNextPart=block|NextPart=Documentation/How_Tos/Calc:_Logical_functions
 +
|toccontent= <div style="padding: 4px; font-size: 130%; font-weight: hidden; background-color:#DCE9FC;">FUNCTIONS</div>
 +
 
 +
* [[Documentation/How_Tos/Calc:_CELL_function|<div style="font-size: 120%;">Cell]]
 +
* [[Documentation/How_Tos/Calc:_CURRENT_function|<div style="font-size: 120%; border-style: double; border-color:#778899;">Current]]
 +
* [[Documentation/How_Tos/Calc:_FORMULA_function|<div style="font-size: 120%;">Formula]]
 +
* [[Documentation/How_Tos/Calc:_ISBLANK_function|<div style="font-size: 120%;">Isblank]]
 +
* [[Documentation/How_Tos/Calc:_ISERR_function|<div style="font-size: 120%;">Iserr]]
 +
* [[Documentation/How_Tos/Calc:_ISERROR_function|<div style="font-size: 120%;">Iserror]]
 +
* [[Documentation/How_Tos/Calc:_ISEVEN_function|<div style="font-size: 120%;">Iseven]]
 +
* [[Documentation/How_Tos/Calc:_ISEVEN_ADD_function|<div style="font-size: 120%;">Iseven Add]]
 +
* [[Documentation/How_Tos/Calc:_ISLOGICAL_function|<div style="font-size: 120%;">Islogical]]
 +
* [[Documentation/How_Tos/Calc:_ISNA_function|<div style="font-size: 120%;">Isna]]
 +
* [[Documentation/How_Tos/Calc:_ISNONTEXT_function|<div style="font-size: 120%;">Isnontext]]
 +
* [[Documentation/How_Tos/Calc:_ISNUMBER_function|<div style="font-size: 120%;">Isnumber]]
 +
* [[Documentation/How_Tos/Calc:_ISODD_function|<div style="font-size: 120%;">Isodd]]
 +
* [[Documentation/How_Tos/Calc:_ISODD_ADD_function|<div style="font-size: 120%;">Isodd Add]]
 +
* [[Documentation/How_Tos/Calc:_ISREF_function|<div style="font-size: 120%;">Isref]]
 +
* [[Documentation/How_Tos/Calc:_ISTEXT_function|<div style="font-size: 120%;">Istext]]
 +
* [[Documentation/How_Tos/Calc:_N_function|<div style="font-size: 120%;">N]]
 +
* [[Documentation/How_Tos/Calc:_NA_function|<div style="font-size: 120%;">Na]]
 +
* [[Documentation/How_Tos/Calc:_TYPE_function|<div style="font-size: 120%;">Type]]
 +
}}__TOC__
  
 
== CURRENT ==
 
== CURRENT ==

Revision as of 04:18, 1 June 2013


CURRENT

Returns the current (to date) result of evaluating the formula.


Syntax:

CURRENT()

This function returns the result to date of evaluating the formula of which it is a part (in other words the result as far as that evaluation has got). Its main use is together with the STYLE function to apply selected styles to a cell depending on the cell contents.


Example:

1 + 2 + CURRENT()

returns 6. The formula is calculated from left to right as: 1 + 2 equals 3, giving the result to date when CURRENT() is encountered; CURRENT() therefore yields 3, which is added to the original 3 to give 6.

A2 + B2 + STYLE(IF(CURRENT()>10; ”Red”; ”Default”))

returns A2 + B2   (STYLE returns 0 here). If this sum is greater than 10, the style Red is applied to the cell. See the STYLE function for more explanation.

"choo" & CURRENT()

returns choochoo.


Further information:

This function is best used only in simple situations. A more complex example: 1 + 2*CURRENT() returns 5, because although the 1 has been encountered as the formula is evaluated, it is ignored because evaluating the multiplication has prescendence. The formula's value upto CURRENT() equals 2. Thus 2*CURRENT() yields 4, with the result: 1 + 4 equals 5. However the exact order of calculation in more complex cases should not be relied on.


Template:Documentation/SeeAlso
Retrieved from "https://wiki.openoffice.org/w/index.php?title=Documentation/How_Tos/Calc:_CURRENT_function&oldid=225647"
Views
Personal tools
Navigation
Tools