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

From Apache OpenOffice Wiki
Jump to: navigation, search
m (Bot: Adding Category: Documentation)
m
 
(7 intermediate revisions by 6 users not shown)
Line 1: Line 1:
__NOTOC__
+
{{DISPLAYTITLE:PROPER function}}
 +
{{Documentation/CalcFunc TextTOC
 +
|ShowPrevNext=block
 +
|PrevPage=Documentation/How_Tos/Calc:_MID_function
 +
|NextPage=Documentation/How_Tos/Calc:_REPLACE_function
 +
}}__NOTOC__
  
 
== PROPER ==
 
== PROPER ==
returns text with words in lowercase after a capitalised first letter.
+
returns text with words in lowercase after a capitalized first letter.
  
 
=== Syntax: ===
 
=== Syntax: ===
 
<tt>'''PROPER(text)'''</tt>
 
<tt>'''PROPER(text)'''</tt>
: returns <tt>'''text'''</tt> with the first character of each word capitalised, and other characters in lower case.
+
: returns <tt>'''text'''</tt> with the first letter of each word capitalized, and other letters in lower case. More specifically, the first letter and any letter that follows a non-letter are capitalized.
  
 
=== Example: ===
 
=== Example: ===
 
<tt>'''PROPER("gooD morNINg")'''</tt>
 
<tt>'''PROPER("gooD morNINg")'''</tt>
 
: returns <tt>'''Good Morning'''</tt>.
 
: returns <tt>'''Good Morning'''</tt>.
 +
<tt>'''PROPER("john o'connor")'''</tt>
 +
: returns <tt>'''John O'Connor'''</tt>.
 +
<tt>'''PROPER("don't worry")'''</tt>
 +
: returns <tt>'''Don'T Worry'''</tt>. The '''T''' is capitalized as it follows a non-letter.
 +
<tt>'''SUBSTITUTE(PROPER(SUBSTITUTE("don't worry";"'";"'x"));"'X";"'")'''</tt>
 +
: returns <tt>'''Don't Worry'''</tt>.
  
{{Documentation/SeeAlso|
+
{{SeeAlso|EN|
 
* [[Documentation/How_Tos/Calc: LOWER function|LOWER]]
 
* [[Documentation/How_Tos/Calc: LOWER function|LOWER]]
 
* [[Documentation/How_Tos/Calc: UPPER function|UPPER]]
 
* [[Documentation/How_Tos/Calc: UPPER function|UPPER]]
Line 20: Line 31:
 
* [[Documentation/How_Tos/Calc: Functions listed alphabetically|Functions listed alphabetically]]
 
* [[Documentation/How_Tos/Calc: Functions listed alphabetically|Functions listed alphabetically]]
 
* [[Documentation/How_Tos/Calc: Functions listed by category|Functions listed by category]]}}
 
* [[Documentation/How_Tos/Calc: Functions listed by category|Functions listed by category]]}}
[[Category: Documentation]]
+
[[Category: Documentation/Reference/Calc/Text functions]]

Latest revision as of 15:34, 2 February 2024



PROPER

returns text with words in lowercase after a capitalized first letter.

Syntax:

PROPER(text)

returns text with the first letter of each word capitalized, and other letters in lower case. More specifically, the first letter and any letter that follows a non-letter are capitalized.

Example:

PROPER("gooD morNINg")

returns Good Morning.

PROPER("john o'connor")

returns John O'Connor.

PROPER("don't worry")

returns Don'T Worry. The T is capitalized as it follows a non-letter.

SUBSTITUTE(PROPER(SUBSTITUTE("don't worry";"'";"'x"));"'X";"'")

returns Don't Worry.



See Also
Retrieved from "https://wiki.openoffice.org/w/index.php?title=Documentation/How_Tos/Calc:_PROPER_function&oldid=260109"
Views
Personal tools
Navigation
Tools