Change Text Case Using Power Query

Power Query converts text to UPPERCASE, lowercase or Capitalize Each Word in two clicks, and the result refreshes when the source changes. Use Transform to change a column in place, or Add Column to keep the original.

WhereTransform → Format, or Add Column → Format
M functionsText.Upper, Text.Lower, Text.Proper
Works inExcel 2016 and later, Power BI

The data

Names written in mixed letter case

Step 1: Load the data

Click in the list → Data → From Table/Range → OK.

Create Table dialog
Data loaded into the Power Query Editor

Step 2: Change the case

Replace the column

Right-click the column header → Transform → choose a case.

Option Result for “aJAY anand” Excel equivalent
UPPERCASE AJAY ANAND UPPER
lowercase ajay anand LOWER
Capitalize Each Word Ajay Anand PROPER
Transform menu with UPPERCASE
Column converted to capital letters

Keep the original and add new columns

Select the column → Add Column → Format → choose a case. Repeat for each case you need.

Add Column tab Format menu
New column in lowercase
Capitalize Each Word on the Add Column tab
Upper, lower and proper case columns

Double-click a header to rename it.

Step 3: Load and refresh

Home → Close & Load To → Existing worksheet, pick a cell, OK. Right-click the result → Refresh after adding names.

Close and Load To
Import Data dialog
Upper, Lower and Proper columns loaded into Excel
Refreshing after adding data

Things to know

  • Capitalize Each Word also lowercases the rest of each word, so McDonald becomes Mcdonald and XL n CAD becomes Xl N Cad. Fix exceptions afterwards with Replace Values.
  • Changing case is a good first step before matching or removing duplicates, because Power Query compares text case-sensitively.
  • For a quick one-off without Power Query, use the free text case converter.

Related

Last updated · Written by Ajay Anand, Microsoft Excel MVP