Friday, May 31, 2013

yogi_WorkAround to Correctly Apply PROPER Function To A String In Google Spreadsheet

                                          Google Spreadsheet   Post  #1224
Yogi Anand, D.Eng, P.E.      ANAND Enterprises LLC -- Rochester Hills MI     www.energyefficientbuild.com.   May 31, 2013
user Chris Palsgrove (http://productforums.google.com/forum/?zx=mwi1lx7ihzkq#!category-topic/docs/spreadsheets/-r1p-PRSdyU)
PROPER() function capitalizing more than expected
When using the PROPER() function, it seems to be capitalizing anything that follows a non-alphabetical character instead of a space or other whitespace, which in a lot of cases is undesirable.
Examples:
"4th grade" becomes "4Th Grade"
"It's a boy" becomes "It'S A Boy"
"I'm here" becomes "I'M Here"
"Se7en" becomes "Se7En"
"Ke$ha" becomes "Ke$Ha"

In all of the above cases, it's obvious that there is one letter that gets capitalized that was not intended to be capitalized. There are a few cases where this behavior might be desirable, but that would be the exception, I believe, not the rule.
Examples:
"O'connor" becomes "O'Connor"
"L'enfant plaza" becomes "L'Enfant Plaza"

It seems that given the wording on the description of the PROPER() function in the Google Spreadsheet Function List, the behavior of the function should be changed to capitalize the first alphabetical character immediately following a whitespace character instead of immediately following a non-alphabetical character. That is, unless I'm missing something and this is the desired behavior for a reason. Thanks for looking into this!

-------------------------------------------------------------------------------------------------------------------------

No comments:

Post a Comment