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:

    Formula Description Returns
    =1+CURRENT() Here the formula adds 1 and 1, giving 2. 2
    =1+2+CURRENT()+4 The formula is evaluated from left to right as 1 + 2 equals 3, giving the result to date 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 to give a final total of 10. 10
    ="very, "&CURRENT()&D1 where cell D1 contains the string "good". 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
    =A2+B2+STYLE(IF(CURRENT()>10;"Bad"; "Good")) where cells A2 and B2 contain the values 6 and 7. The example returns A2 + B2, since the STYLE function always returns the value 0. However, 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:

    None.

    ODF standard:

    None.

    Equivalent Excel functions:

    None.