Function Propercase() - Excluding Abbreviations and Acronyms from Propercase

The propercase() function will capitalize text to suit the situation. It will capitalize the first letter of each word within a string of text and exclude some words from capitalization like: "and, the, of".
 
But what about acronyms or abbreviations that you do not want in propercase or excluded from capitalization like: "PO Box, RD, ROI or HR"? Unfortunately acronyms and abbreviations do not work with the proper case function as they simply don’t follow the same standard.

If you wish to ignore some abbreviations or acronyms when using the propercase document formatting or functions, you need to use a formula that nests the Propercase function inside the required Replace function(s).

This is an example of the formula that you should use, notice that the propercase is nested in as many replace functions as required:
 
Replace(Replace(propercase([*Insert your Data Reference HERE*],"and|the|of","Mc|O'|Mc'Mac"), "Po Box","PO Box"),"Rd 1","RD 1")

Breaking the formula down


We have the inner propercase function, which returns our string:
propercase([*Insert your Data Reference HERE*],"and|the|of","Mc|O'|Mc'Mac")

Then we have our outer Replace function, which replace our Abbreviations that have been turned into propercase:
Replace(propercase([*Insert your Data Reference HERE*],"and|the|of","Mc|O'|Mc'Mac"), "Po Box","PO Box")

Anything outside this, is optional and allows you to replace additional abbreviations, you can add as many outer replace functions as you like, just stick to the same format:
Replace(Replace(propercase([*Insert your Data Reference HERE*],"and|the|of","Mc|O'|Mc'Mac"), "Po Box","PO Box"),"Rd 1","RD 1")

Example in Web form:



Example of setup in question set:


 

Related Articles