Documentation/Calc Functions/EXACT

    From The Document Foundation Wiki


    Function name:

    EXACT

    Category:

    Text

    Summary:

    Performs a case-sensitive comparison of two text strings, returning a boolean value to indicate whether they are identical.

    Syntax:

    EXACT(Text1; Text2)

    Returns:

    Returns the boolean value TRUE to indicate that the two strings are identical and returns FALSE otherwise.

    Arguments:

    Text1 is a text string (in quotation marks), a number, or a reference to a cell containing one of those types, that specifies the first string to be encoded.

    Text2 is a text string (in quotation marks), a number, or a reference to a cell containing one of those types, that specifies the second string to be encoded.

    Additional details:

    Tip.svg

    Tip:
    EXACT matches all characters in the two strings, whether those characters are printable or non-printable. If you use EXACT to compare two strings and unexpectedly get a FALSE result, it could be because one or both strings contain non-printable characters.


    Examples:

    Formula Description Returns
    =EXACT("red car"; "red car") Here the function returns TRUE because the two string arguments are identical. TRUE
    =EXACT("microsystems"; "Microsystems") Here the function returns FALSE because the two strings are not identical. FALSE
    =EXACT(D1; D2) where cell D1 contains the string "Hidden characters?" and cell D2 contains the formula =D1&CHAR(7). Here the function returns FALSE because the two strings are not identical - the second argument contains a non-printable bell character (Unicode U+0007). Note that visually there appears to be no difference between the strings. FALSE
    =EXACT(E1; E2) where cells E1 and E2 both contain the number 1. Here the function converts both numbers to text, compares them, and returns the value TRUE. TRUE

    Related LibreOffice functions:

    FIND

    SEARCH

    ODF standard:

    Section 6.20.8, part 2

    Related (or similar) Excel functions:

    EXACT