While working on importing data from the internet or softwares like ACCESS, SQL, etc, there could be a need to update the text to proper case.
Excel provides built-in functions for users to change the case of the text to upper, proper & lower cases.
We will use the IF, UPPER, LOWER & EXACT functions together to make a formula that will work in a single cell taking a reference from the corresponding cell.
IF FUNCTION: The IF function checks if the condition you specify is TRUE or FALSE. If the function evaluates to true, it returns one value, else it returns the 2nd value given in the function.
Syntax = IF(logical_test,value_if_true,value_if_false)
logical_test: Logical test is the condition or criteria to be tested.
value_if_true: The value that should be returned if the logical_testreturns TRUE.
value_if_false: The value that should be returned if the logical_testreturns FALSE.
UPPER FUNCTION – The Upper function will convert a lower or proper case string into UPPER case letters. For example: abc or Abc to ABC.
text: Itis the text which should be converted to uppercase.
LOWER FUNCTION – The Lower function will convert UPPER or PROPER case string into LOWER case letters. For example, ABC or Abc to abc.
text: It is the text which should be converted to lowercase.
EXACT FUNCTION – The Exact function checks whether two text strings are exactly the same, and returns TRUE or FALSE. EXACT is case-sensitive.
text1: Itis the first text string to be compared.
text2: It is the second text string to be compared.
Let us take an example:
=IF(EXACT(A2,UPPER(A2)),"Upper Case",IF(EXACT(A2,LOWER(A2)),"Lower Case","Upper and Lower Case"))
The applications/code on this site are distributed as is and without warranties or liability. In no event shall the owner of the copyrights, or the authors of the applications/code be liable for any loss of profit, any problems or any damage resulting from the use or evaluation of the applications/code.