To capitalize the first letter of each word, we are going to use the following dataset, which contains some employee names in column B but in the wrong way. We will correct the name in column C.
Method 1 – Using Excel Flash Fill to Capitalize the First Letter of Each Word
Steps:
- Select the entire result range (C5:C10).
- Insert the first result value manually. In our example, we put Tom Smith in C5.
- Press Ctrl + Enter.
- Press Ctrl + E.
- This will automatically capitalize all the first letters for each word.
Read More: Excel VBA to Capitalize First Letter of Each Word
Method 2 – Capitalizing the First Letter of Each Word by Using the PROPER Function
Steps:
- Select cell C5.
- Insert the following:
=PROPER(B5)
- Press Enter.
- Drag the Fill Handle down or Double-click on the Plus (+) icon.
- You can see all the first letters of each word are now capitalized in column C.
Method 3 – Applying VBA to Capitalize the First Letter
Steps:
- Go to the Developer tab from the ribbon.
- Click on Visual Basic under the Code category. Alternatively, press Alt + F11.
- Another way to display the Visual Basic Editor is to right-click on your worksheet and click on View Code.
- This will take you to the Visual Basic Editor.
- Click on Module from the Insert drop-down menu.
- Copy and paste this VBA code there.
VBA Code:
Sub CapitalizeFirstWord()
Set myRange = Application.Selection
Set myRange = Application.InputBox("Select Range", "CapitalizeFirstWord", myRange.Address, Type:=8)
For Each myCell In myRange
myCell.Value = Application.Proper(myCell.Value)
Next
End Sub
- Click on that save icon or press Ctrl + S.
- While saving the file, make sure you save it as an .xlsm file.
- Go back to the worksheet.
- Go to the Developer tab on the ribbon.
- Click on Macros under the Code group.
- Select the macro from the list (should be selected by default if it’s the only one) and click on the Run button.
- Select the range of cells where you want to capitalize the first letter of each word. We selected the range $B$5:$B$10.
- Click OK.
- Here’s the result
Read More: How to Change Lowercase to Uppercase in Excel
Method 4 – Applying Power Query to Capitalize the First Letters
Steps:
- Go to the Data tab from the ribbon.
- Select From Table/Range under the Get & Transform Data category.
- This will show the Create Table dialog box.
- Select the range $B$4:$B$10 under Where the data for your table?
- Check My table has headers.
- Click OK.
- This will take you to the Power Query window.
- Select the table and right-click.
- Go to Transform.
- From the drop-down menu, click on Capitalize Each Word.
- This will capitalize the first letter of each word.
- Save the table.
- This will take you back to another worksheet named Table.
- You can see the first word for each name is now capitalized.
Read More: How to Change Lowercase to Uppercase with Formula in Excel
Download the Practice Workbook
Related Articles
- How to Change Sentence Case in Excel
- How to Change Case for Entire Column in Excel
- How to Change Case in Excel Sheet
- Change Upper Case to Lower Case in Excel
- How to Make First Letter of Sentence Capital in Excel
- Change Lowercase to Uppercase in Excel Without Formula
<< Go Back to Change Case | Text Formatting | Learn Excel
Get FREE Advanced Excel Exercises with Solutions!