How to Capitalize First Letter of Sentence in Excel

When you import data from other external systems or user entries, some texts become all lowercase and inconsistently capitalized. Capitalizing the first letter is essential to give your dataset a clean professional formatting. Excel’s UPPER function is useful for this task.

Key Takeaways

➤ Select a helper column cell to insert the corrected sentence and type the following formula:
=UPPER(LEFT(D2,1)) & MID(D2,2,LEN(D2)-1)
➤ Replace D2 with the appropriate cell reference containing the sentence you’re converting.
➤ Click Enter and drag down the formula to apply it to the remaining cells. This formula changes only the first letter of the sentence while others remain the same as before.

overview image

There are several other ways to capitalize the first letter of a sentence using flash fill, power query, and VBA macro. Let’s discuss the step-by-step process of each method.

Download Practice Workbook
1

Capitalizing Letters with the Flash Fill Feature

To visually demonstrate the methods, we used a customer feedback dataset. Column D (Recommend) has our targeted sentences with lower casings for the first letters. We’ll capitalize the first letters and keep the rest as they are.

Capitalizing Letters with the Flash Fill Feature

Excel’s flash fill feature automatically recognizes patterns and applies them to the chosen cells. If you have a smaller dataset, use the flash fill feature like this:

➤ Choose a neighboring cell to the text string that you want to convert.
➤ Type the correct version of the sentence with the first letter capitalized. You can also create a combination of uppercase and lowercase letters following a general pattern.

Capitalizing Letters with the Flash Fill Feature

➤ Now, select all the cells of the column and go to the Data tab. From the Data Tools group, click on the Flash Fill icon. Or, use the keyboard shortcut  CTRL  +  E .

Capitalizing Letters with the Flash Fill Feature

➤ Excel will fill the remaining cells with capitalized first letters. In case it misses any cells or it doesn’t work at all, select another cell and repeat the process.

Capitalizing Letters with the Flash Fill Feature


2

Converting to Uppercase Letters with UPPER, LEFT, and MID Functions

With the UPPER function, you can capitalize any text string you want. However, we’re working with full sentences, so we need to use it with other functions like LEFT, MID, and LEN to apply uppercase to the first letter only. Let’s get to the process:

➤ Create a helper column to put the corrected sentences. Select a cell adjacent to the first text string you want to correct.
➤ Type the following formula to apply uppercase only to the first letter of the sentence and keep the original casing of the rest of the sentence:

=UPPER(LEFT(D2,1)) & MID(D2,2,LEN(D2)-1)

Converting to Uppercase Letters with UPPER, LEFT, and MID Functions

➤ If you want to force lowercase on the remaining letters, type this formula instead:

=UPPER(LEFT(D2,1)) & LOWER(MID(D2,2,LEN(D2)-1))

➤ For each formula, replace D2 with the cell reference containing the sentence with incorrect casing.
➤ Press Enter and use the fill handle to drag the formula down to the remaining cells.

Converting to Uppercase Letters with UPPER, LEFT, and MID Functions

Explanation
In our formulas, LEFT(D2,1) gets the first character of the text in cell D2. With the UPPER() function, you convert that first character to uppercase. The MID() function extracts the rest of the string, starting from the 2nd character to the end. Finally, LEN(D2) - 1 ensures we get the entire string except the first character. If you use the formula with LOWER() function, it ensures that the rest of the text string is in lowercase.

3

Using the REPLACE, UPPER, and LEFT Functions

Another way to easily capitalize the first letter of a sentence is to use the REPLACE function. It replaces the letter and changes it based on the given arguments.

So, we used it with the UPPER and LEFT function that applies uppercase to the first letter. Adding a LOWER function forces lower casing to the remaining letters. Here’s how to apply the formula:

➤ Select a cell adjacent to the target cell with the incorrect sentence. Insert the following formula:

=REPLACE(LOWER(D2), 1, 1, UPPER(LEFT(D2, 1)))

Using the REPLACE, UPPER, and LEFT Functions

➤ If you don’t want to force lowercase on the remaining letters, type this formula instead:

=REPLACE(D2,1,1,UPPER(LEFT(D2,1)))

➤ Instead of D2, use the cell reference of your target cell.
➤ Press Enter and drag the formula down to the remaining cells.

Using the REPLACE, UPPER, and LEFT Functions


4

Make All the First Letters Capital with Power Query

To capitalize the first letter of each word of the sentence without a formula, you can use the Power Query tool. It’s a dynamic approach to the problem that automatically updates the future inputs.

However, with Power Query, there’s no way to capitalize only the first letter of the first text of a sentence. Follow these steps to use the tool and capitalize all the first letters:

➤ Select your data range and go to the Data tab. Choose Get & Transform from the Get & Transform Data group and click on the From Table/Range icon.

Make All the First Letters Capital with Power Query

➤ When Excel prompts you to prompt you to turn your dataset into a table, you can either click Ok to accept it or press Cancel.

➤ If you cancel table creation, go to the Name Box and create a one-word name for your dataset. Press Enter to open the Power Query tool.

Make All the First Letters Capital with Power Query

➤ In the Power Query editor, select the column you want to capitalize. Go to the Transform tab, choose Format, and select Capitalize Each Word from the drop-down menu.

Make All the First Letters Capital with Power Query

➤ Go back to the Home tab. Click Close & Load to apply the change and load it back into Excel.

➤ If you don’t like the custom Power Query format, go to Table Design and clear the formatting, or choose one from the Quick Styles option.

Make All the First Letters Capital with Power Query


5

Applying VBA Macro to Capitalize Letters in One or Multiple Sentences

If you want to capitalize the first letter of one or multiple sentences, VBA coding is your only option. Follow the steps given below to create your own custom formula with VBA:

➤ To open the Developer tab, go to File >> More >> Options.

Applying VBA Macro to Capitalize Letters in One or Multiple Sentences

➤ Click on Customize Ribbon, choose Developer, and click Ok.

Applying VBA Macro to Capitalize Letters in One or Multiple Sentences

➤ As the Developer tab appears on the main ribbon, select the helper column cells, click on Developer and choose Visual Basic to open the VBA editor.

Applying VBA Macro to Capitalize Letters in One or Multiple Sentences

➤ Click on Insert, select Module.

➤ In the Module Box, paste the following code:

Function CapitalizeSentences(ByVal txt As String) As String
    Dim result As String
    Dim i As Integer
    Dim isNewSentence As Boolean
    txt = LCase(txt)
    isNewSentence = True
    result = ""
    For i = 1 To Len(txt)
        Dim ch As String
        ch = Mid(txt, i, 1)
        If isNewSentence And ch Like "[a-z]" Then
            result = result & UCase(ch)
            isNewSentence = False
        Else
            result = result & ch
        End If
        If ch = "." Or ch = "!" Or ch = "?" Then
            isNewSentence = True
        ElseIf ch <> " " And ch <> vbTab And ch <> vbCrLf Then
            isNewSentence = False
        End If
    Next i
    CapitalizeSentences = result
End Function
Sub CapitalizeLetters()
End Sub

➤ Now, press  F5  or click on Run from the top ribbon. Choose Run Sub/UserForm from the drop-down menu.
➤ Go back to the Excel tab and type this formula in a helper column:

=CapitalizeSentences(D2)

➤ Press Enter and drag it down to other cells. The formula capitalizes the first letter of each sentence (after ., !, or ?) while the rest stays in lowercase.

➤ To save the file in correct format, click on the Files tab and choose Save As.
➤ As you locate the desired location to save the file, click on the arrow sign beside the Save as Type box. Choose Excel Macro-Enabled Workbook and click Save.

Applying VBA Macro to Capitalize Letters in One or Multiple Sentences


Frequently Asked Questions

Can you change the case of letters in Excel?

Yes, you can use the PROPER, UPPER, or LOWER function to change letter cases in Excel. To capitalize all the first letters of a text string, type the following formula in its adjacent cell:

=PROPER(D2)

Make all the letters uppercase with this formula below:

=UPPER(D2)

Type the formula below to convert all the letters to lowercase:

=LOWER(D2)

Replace D2 with the cell reference of your text string.

How do you check if the first letter is capital in Excel?

To check if the first letter of your text string is capitalized, select its neighboring cell and enter the following formula:

=EXACT(LEFT(D2,1), UPPER(LEFT(D2,1)))

Put the appropriate cell reference instead of D2. The formula returns TRUE if the first letter is capitalized and FALSE otherwise.

How do I capitalize all text in Excel without formula?

To capitalize all text in Excel without using a formula, create a helper column and type the capitalized version of the text in the first row. For example, type JANE AUSTIN if the original is jane austin. Now, select all the cells and press  Ctrl  +  E  to trigger Flash Fill and apply the same capitalized text pattern to all the selected cells.


Concluding Words

Without a doubt, using the Flash Fill feature is the easiest way to capitalize the first letter of a sentence. However, it might not be as effective for large and complex datasets.

Applying a formula or VBA coding is more reliable, but you need to create a separate column to apply these methods. However, you can delete the column anytime after copying its data into the original column.

ExcelInsider Team
We will be happy to hear your thoughts

Leave a reply

Excel Insider
Logo