Convert Selection To Proper Case Using Macros

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 the proper case with just one click only. But before doing this makes sure that you have enabled the Developer Tab.

Previously: How To Convert Selection to Lower Case In Excel Using Macros

Purpose of this tutorial: to learn how to convert selected text to proper case.

Copy The Source Code Below;

‘Its Important to Select the Range First

Sub ConvertSelectionToProperCase()

Dim range As Range

For Each range In Selection
‘Check if this is text first, then convert into proper case
If Application.WorksheetFunction.IsText(range) Then
range.Value = Application.WorksheetFunction.Proper(range)
End If
Next

End Sub

Here are our text in which we are going to do some clean up to show you as an example;

Step 1

Here I am mentioning all the procedure with step-by-step:

Step 1: Follow this procedure;

GO TO DEVELOPER> CODE> VISUAL BASIC

Step 2

STEP 2: Now continue this paste in your code and select the SAVE option. Close the window when you are done with this step.

STep 3

STEP 3: Now we are going to test it out to show you.

First, open the sheet which contains the data and follow the procedure: GO TO DEVELOPER> CODE> MACROS

Final

 Firstly make sure that your text and macro both are selected, and then click the RUN option.

It’s Done, Heres the result;

Convert Selection to Proper Case