Excel Productivity Guide
Useful Excel Tips | Keyboard Shortcuts | VBA Codes
Download this Free E-Book to take your excel skills to a whole next level using some smart Excel tactics.
Worth $20, Absolutely Free
In Excel, we have three specific functions to convert text from one case to another. Whereas there is another case for which we don’t have any function or any other option.
That’s ==> Sentence Case
You might be wondering: What sentence case actually is?
Well, in sentence case, for an entire sentence, the first letter of the first word should be in the capital case and rest of the letters of the first word and all the other words should be in lower case.
Something like this:
Now, the thing is.
How can we convert a normal text into a sentence case if we don’t have any particular function or option for it in Excel?
The answer is simple.
We can create a formula by combining other text functions.
So today, in this post, I’d like to share with you a simple formula which you can use to convert a normal case to sentence case in Excel.
So let’s get started and download this file from here to follow along.
To create a formula for sentence case we need to use following five functions.
And the formula will be:
How does it work
To understand this formula, we need to split it into two parts.
In the first part, the left function returns the first character of and then upper function converts it into upper case.
In the second part, will convert rest of the text to lower case as we need rest of the letters in lower case for sentence case.
And finally, this combination return the text in sentence case.
Yes, that's it.
Check this out ==> Fill Justify
The formula we have learned above is simple and easy to apply. But, do you have the same thought in your mind which I have right now?
What will we do if there is more that one sentence in a cell?
This is crazy:
And you know, in this situation above formula is for nothing.
We do need a different formula which can convert a text into the sentence case when we have more than one sentence.
Here's the formula:
=SUBSTITUTE(SUBSTITUTE(PROPER(SUBSTITUTE(SUBSTITUTE(LOWER(C12),". ","9z9")," ","zxz")),"9Z9",". "),"zxz"," ")
This formula can solve our problem.
How does it work
So you want to learn how this formula works? Right? Well, you need to hold your nerves and stay with me for a minute.
We need to split this formula into three different parts like I have done below.
In the first part, with lower function and two substitute functions, we have converted the text into lower case and replace all the spaces within words with “zxz” and space and dot between two sentences with “9z9”.
At this point, we don't have any space in our text. So far so good.
In the second part, we have converted the entire text into the proper case using the proper function.
Whenever you convert a text into a proper case and you have a number in that text, the function will treat that text separate words. Look at the below example.
In the third part, we have again used two substitute functions to replace “zxz” with a space and “9z9” with a dot and space.
In this way, we have converted our multiple sentence text into an actual sentence case text.
Download your sample file from here to follow along.
Sometimes we use Excel to type some sort of text and there is probability to type it in the wrong case. And, if you know to convert a text into sentence case, you can correct your text easily.
If you have a sentence where you have a question mark instead of a dot then you can use the question mark in the formula and rest of the formula will be same.
I hope this formula tip will help you get better at Excel.
Now, tell me one thing. Do you have any other method to do this text conversion? Share with me in the comment section, I would love to hear from you.
And, please don’t forget to share this tip with your friends.