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

From Apache OpenOffice Wiki
Jump to: navigation, search
(Syntax:: more detail)
(Example:: examples to show apostrophe handling)
Line 45: Line 45:
 
<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 capitalised as it follows a non-letter.
 +
<tt>'''SUBSTITUTE(PROPER(SUBSTITUTE("don't worry";"'";"'x"));"'X";"'")'''</tt>
 +
: returns <tt>'''Don't Worry'''</tt>.
  
 
{{Documentation/SeeAlso|
 
{{Documentation/SeeAlso|

Revision as of 23:17, 7 May 2014


PROPER

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

Syntax:

PROPER(text)

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

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 capitalised as it follows a non-letter.

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

returns Don't Worry.
Template:Documentation/SeeAlso
Retrieved from "https://wiki.openoffice.org/w/index.php?title=Documentation/How_Tos/Calc:_PROPER_function&oldid=234932"
Views
Personal tools
Navigation
Print/export
Tools