Proper() Function
December 11, 2010 2 Comments
I was reminded of a common problem in the workplace. Cleaning up Data. Whether it’s a mailing or contact list, employee records in a spreadsheet or from some other database, often times no steps are taken to ensure that the data is entered correctly. So while “Mary Kay” takes her grammar and writing very seriously, “MARK JOHNSON” works in Oracle where he has to use all caps and is too lazy to switch when he’s multi-tasking and filling out his order form for that new camera he wants. And “john doe” is a teenager and of the mindset that lower caps and shortening of words is how the texting world operates.
So now you want to send out Christmas cards and don’t want the greeting to read “Dear MARK”. What to do? Well, while I’d like to say I discovered some fancy formula to solve this common problem (I thought about using a combination of the Left, Find, and Len functions, it suddenly dawned on me that Excel already has a built-in function for this: Proper. Like Upper(), which changes all letters to capital and Lower() which makes them all lowercase, Proper() changes the case of letters in a word. But, it makes them correct. Meaning that the first letter (even in the middle initial or name) is capitalized, with the remaining letters lowercase.
It’s proper usage: Proper(TextToBeConverted)
The Proper function has got to be ona my all time favorites! LOL
Pingback: Starting to learn VBA « BobbyBluford.com