Documentation/Calc Functions/PROPER

    From The Document Foundation Wiki
    Other languages:


    Function name:

    PROPER

    Category:

    Text

    Summary:

    Converts a supplied text string so that the first letter of each word is uppercase while subsequent letters of each word are lowercase. This case style is often referred to as start case or initial caps.

    Syntax:

    PROPER(Text)

    Returns:

    Returns a text string that corresponds to the supplied text string, converted to the start case style.

    Arguments:

    Text is a text string (in quotation marks) or a reference to a cell containing a text string, that is the string to be converted to the start case style.

    Additional details:

    The operation of PROPER depends on locale settings and so it should not be regarded as portable.

    PROPER utilizes the following guidelines, drawn from ODF 1.2:

    • If the first character of the supplied string is a lowercase letter, it is converted to its uppercase equivalent. For example, the formula =PROPER("hello") returns the string "Hello".
    • If a character in the supplied string is a lowercase letter that is preceded by a non-letter, it is converted to its uppercase equivalent. For example, the formula =PROPER("p2p") returns the string "P2P".
    • If a character in the supplied string is an uppercase letter that is preceded by a letter, it is converted to its lowercase equivalent. For example, the formula =PROPER("hELLO WORLD") returns the string "Hello World".

    In addition to converting lowercase characters in the range [a…z] to uppercase characters in the range [A…Z] and vice versa, in accordance with the above guidelines, PROPER also converts many other characters.


    The Unicode Standard contains much information about case conversion. The following sections of the standard are relevant:

    The three links above lead to sections within the documentation for Unicode 5.2.0, which is the legacy version of the standard that is referenced in ODF 1.2. The latest version of the Unicode Standard can be found via the Unicode public website.

    Examples:

    Formula Description Returns
    =PROPER("the document foundation") Here the function converts the string to start case style and returns "The Document Foundation". The Document Foundation
    =PROPER(D1) where cell D1 contains the string "gooD morNINg". Here the function converts the string to start case style and returns "Good Morning". Good Morning
    =PROPER("robert o'brien") Here the function converts the string to start case style and returns "Robert O'Brien". Robert O'Brien
    =PROPER("don't worry") Here the function converts the string to start case style and returns "Don'T Worry". Don'T Worry

    Related LibreOffice functions:

    LOWER

    UPPER

    ODF standard:

    Section 6.20.16, part 2

    Related (or similar) Excel functions:

    PROPER