Convert Selection to Sentence Case

Excel Macros can make it easy to clean up the text whenever you need to do it. It is easy by creating the Macros in excel to convert selection to sentence case with just one click only. But before doing this makes sure that you have enabled the Developer Tab.

Purpose of this tutorial: convert selected text to sentence case by using macros.

We will do clean up in this text.

Convert Selection to Sentence Case

Previously In Macros: How to Convert Selection to Proper Case Using Macros in Excel?

Here we are mentioning all the process step-by-step for this purpose:


Convert Selection to Sentence Case1

STEP2. Now you have to paste in your code and select the save option. After saving close the window.

Copy Source Code:

‘Its Important To Select RANGE First
‘Assumption is each cell is a single sentence
Sub ConvertSelectionToSentenceCase()

Dim range As Range

For Each range In Selection
‘Check if this is text first, then convert into sentence case
‘Make the first letter capitalized, then the rest of the text as small letters
If Application.WorksheetFunction.IsText(range) Then
range.Value= UCase(Left(range, 1)) & LCase(Right(range, Len(range) -1))
End If

End Sub

Convert Selection to Sentence Case2

STEP3. Now we will test it out and show you as example. So, for test it, first open the sheet that contains the data then follows this procedure: GO TO DEVELOPER>CODE>MACROS

Convert Selection to Sentence Case3

Before doing this make sure you have selected both the text and macro and then click the RUN option.

Convert Selection to Sentence Case4

You can see now all the cells are converted into sentence case in just one click.

You can see your final result.

Convert Selection to Sentence Case5