Documentation/Calc Functions/CURRENT

    From The Document Foundation Wiki
    Other languages:


    Function name:

    CURRENT

    Category:

    Information

    Summary:

    Determines the current value of a cell formula evaluation just before CURRENT is called.

    Syntax:

    CURRENT()

    Returns:

    Returns the current value of a formula evaluation as it is, immediately before CURRENT is called. The type of value returned is dependent on context.

    Arguments:

    None.

    Additional details:

    • CURRENT is particularly useful when combined with the STYLE function to apply selected styles to a cell depending on the cell content.

    Examples:

    Data for examples
    A B C D
    1 6 7   good
    Formula Description Returns
    =1+CURRENT() Add 1 and 1 2
    =1+2+CURRENT()+4

    The formula is evaluated from left to right as 1 + 2, giving the result up to that point as 3 when CURRENT() is encountered. CURRENT() therefore yields 3, which is added to the original 3 to give 6. A further 4 is then added.

    10
    ="very, "&CURRENT()&D1 The formula is evaluated from left to right, concatenating the string "very, " with a copy of itself (returned by CURRENT), and then concatenating the string "good" from cell D1. very, very, good
    =A1+B1+ STYLE(IF(CURRENT()>10;"Bad"; "Good")) The STYLE function always returns the value 0.

    The returned value will be displayed using the cell style named "Bad" if it is greater than 10, and using the cell style named "Good" otherwise.

    13 (using the "Bad" cell style)

    Related LibreOffice functions:

    STYLE

    ODF standard:

    None. See instead ORG.OPENOFFICE.CURRENT

    Related (or similar) Excel functions:

    None.