Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

How to Capitalize Highlighted Text in Excel

· 5 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Excel does not have a one-click button to capitalize selected text, but you can do it with a formula or with a quick macro. The fastest reliable method for a few cells is to type =UPPER(A1) in a helper column, copy the result, and paste it back as values. For large or repeated jobs, a short VBA macro can capitalize every highlighted cell in place. Both methods are official Excel features and work in Excel for Microsoft 365, Excel 2021, 2019, and 2016 on Windows and Mac; menu labels can differ slightly by version, device, or region.

What You'll Need

  • Excel for Microsoft 365, Excel 2021, 2019, or 2016 on Windows or Mac.
  • A worksheet with the text you want to capitalize.
  • For the macro method: the Developer tab enabled, or permission to run macros in your workbook. If macros are blocked by your organization, use the formula method instead.

Step-by-Step

Method 1: Formula and Paste as Values (no macros)

  1. Select the cells you want to capitalize. If the text is in column A starting at A1, note the range, for example A1:A10.
  2. Click an empty cell to the right of your data, such as B1, and type =UPPER(A1). Replace A1 with the first cell of your highlighted range.
  3. Press Enter. The cell shows the uppercase version of A1.
  4. Copy the formula down to match your highlighted rows. Drag the fill handle or copy B1 and paste it into B2 through B10.
  5. Select the formula results, press Ctrl+C (Windows) or Command+C (Mac) to copy.
  6. Right-click the first original cell, choose Paste Special, and pick Values. On Mac, use Edit > Paste Special > Values. This replaces the original text with the capitalized text and removes the formulas.
  7. Delete the helper column if you no longer need it.

This method is safe and reversible if you keep a backup copy of the sheet before pasting values over the originals.

Method 2: VBA Macro to Capitalize Highlighted Cells in Place

  1. Save a copy of your workbook first. Macros change cells directly, and there is no undo for a macro that has already run.
  2. Enable the Developer tab if it is not visible: go to File > Options > Customize Ribbon and tick Developer in the right-hand list. On Mac, go to Excel > Preferences > Ribbon & Toolbar and enable Developer.
  3. Press Alt+F11 (Windows) or Option+F11 (Mac) to open the Visual Basic Editor.
  4. In the editor, click Insert > Module. A blank module window opens.
  5. Paste the following code into the module:
    Sub CapitalizeSelection()
        Dim c As Range
        For Each c In Selection
            If Not c.HasFormula Then
                c.Value = UCase(c.Value)
            End If
        Next c
    End Sub
  6. Close the Visual Basic Editor and return to Excel.
  7. Highlight the cells you want to capitalize.
  8. Press Alt+F8 (Windows) or Option+F8 (Mac), select CapitalizeSelection, and click Run.

The macro skips cells that contain formulas so it does not overwrite them with plain text. It also leaves numbers and dates unchanged because UCase only affects letters. If your workbook is saved as .xlsx, save it as .xlsm to keep the macro for later use.

Common Mistakes

  • Pasting formulas over the originals. If you paste the formula results without choosing Values, Excel replaces your text with formulas that point to the wrong cells. Always use Paste Special > Values.
  • Running the macro on the whole sheet. The macro acts on the current selection. If you select entire columns, it will process every cell in them, including headers you may want to keep in mixed case.
  • Forgetting that UPPER changes everything. It converts all letters to capitals, so names like McDonald become MCDONALD. If you need only the first letter capitalized, use =PROPER(A1) instead.
  • Assuming Undo will reverse a macro. Excel's Undo does not cover VBA changes. Keep a backup before running any macro.
  • Overwriting formulas. The macro skips formula cells, but the formula method will replace them if you paste values over them. Check for formulas before you paste.

Tips

  • Use =PROPER(A1) to capitalize the first letter of each word, which is better for names and titles than all caps.
  • Use =LOWER(A1) if you need the opposite effect.
  • To capitalize only the first letter of a cell while keeping the rest lowercase, combine functions: =UPPER(LEFT(A1,1))&LOWER(MID(A1,2,LEN(A1)-1)).
  • Work on a copy of the sheet when testing a macro for the first time.
  • If you use the macro often, add it to your Personal Macro Workbook so it is available in every workbook.

Troubleshooting

  • The formula shows #NAME? or #VALUE!. Check that the cell reference is valid and that you typed the function name correctly. UPPER takes one text argument.
  • The macro does nothing. Make sure you selected cells before running it. Also check that macros are enabled: File > Options > Trust Center > Trust Center Settings > Macro Settings. If your organization blocks macros, use the formula method.
  • The macro changes numbers or dates. UCase leaves non-letter characters alone, but if a cell contains a date stored as text, it may be converted. Test on a copy first.
  • Paste Special is greyed out. Make sure you copied cells, not just started editing a cell. Press Esc and copy again.
  • You cannot find the Developer tab. It is hidden by default. Follow the ribbon customization steps in Method 2.
  • You need to undo a macro change. Close the workbook without saving, then reopen the saved copy. This is why a backup matters.

Frequently Asked Questions

Can I capitalize only part of a cell's text?

Not with a single built-in function. You can use a formula that combines UPPER, LEFT, MID, and LOWER to capitalize specific characters, but it requires manual construction. For mixed formatting inside one cell, Excel does not support partial character capitalization through a formula.

Does Excel have a Change Case button like Word?

No. Excel does not include a Change Case command on the ribbon. You must use formulas or a macro.

Will the macro work on Excel for Mac?

Yes, the VBA code is the same. Use Option+F11 to open the editor and Option+F8 to run the macro. Menu names may differ slightly.

Can I capitalize text in Excel Online?

Excel for the web supports the UPPER formula but does not support running VBA macros. Use the formula method there.

What happens to cells with formulas when I run the macro?

The macro skips cells that contain formulas, so their formulas remain intact. If you want to capitalize the displayed result of a formula, you must change the formula itself or paste values first.

Is there a way to capitalize all text in a column at once?

Yes. Select the entire column, then run the macro. For the formula method, put =UPPER(A1) in the first row of a helper column and fill it down, then paste as values.