Proper() Function

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.

Proper() Function

Excel's Proper Function

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)

Substitute()

Substitute() Function

Substitute Function

When we (collectively, I mean companies, in general) build user Internet forms, why don’t we always create validation rules for fields?  I don’t know- probably never will- but we (Finance, Sales, HR, Operations) are often left to work with it.

So, what do you do when some phone numbers come in as (888) 555-1234 and others as 888-555-1234?  Or when you get some Social Security Numbers in the form 123-45-6789, while other eliminate the dashes?  You probably just leave and do your best to work around it.  But, if you want to work with it (etc. mail merge) or confirm that you have accurate (or at least valid in length) numbers, here’s a good way.  The substitute formula.

It’s very simple: simply tell Excel which cell (b3) needs to be cleaned up, which character you are looking to replace (“-“), and with what character (“”) you’d like to replace it.

=SUBSTITUTE(B3,”-“,”“)