How to Change the Case of Texts in Microsoft Excel
Changing the case of text in Microsoft Excel is a powerful yet often overlooked feature that can help you standardize your data and improve readability. Whether you need to convert text to uppercase, lowercase, or capitalize each word, mastering this skill can significantly enhance your data presentation and consistency.
In this article, you will learn the easy steps to change the case of texts in Microsoft Excel. With a few simple techniques, you’ll be able to transform your data effortlessly.
Let’s explore how to efficiently change the case of text in Excel and take your data management skills to the next level!

Different Ways to Change the Text in Microsoft Excel
Using Formulas
UPPER, LOWER, PROPER functions: These functions change the case of the text. UPPER converts text to all uppercase, LOWER to all lowercase, and PROPER to proper case (the first letter of each word is capitalized).
TRIM function: This function removes extra spaces in your text. This can be useful when you have data that comes from other sources and there might be irregular spacing.
SUBSTITUTE function: This function replaces existing text with new text in a text string.
Using VBA
Change Case: You can use VBA to change the case of text in Excel. Here’s a simple example that changes the case of the text in the selected cells to uppercase.
Replace Text: You can use the Replace function in VBA to replace text in a string or a range of cells.
Excel Functions for Changing Text Cases
There are many built in functions in excel which can be used to change the case of text. These functions are powerful tools for standardizing and formatting text within your spreadsheets. Here are the primary functions for changing text cases in Excel.
Function | Description | Syntax | Example | Result |
---|---|---|---|---|
UPPER | Converts all letters in a text string to uppercase. | UPPER(text) | =UPPER("hello world") | HELLO WORLD |
LOWER | Converts all letters in a text string to lowercase. | LOWER(text) | =LOWER("HELLO WORLD") | hello world |
PROPER | Capitalizes the first letter of each word in a text string and converts all other letters to lowercase. | PROPER(text) | =PROPER("hello world") | Hello World |
How to Change the Text Case Using Formulas in Excel
Formulas in Excel are like magic spells that help transform your data effortlessly. Let's explore three handy ones for changing text cases: UPPER(), LOWER(), and PROPER() functions.
UPPER() Function
This function takes any text you give it and converts it to all uppercase letters. For example, if you have the text "geeksforgeeks" in a cell, =UPPER(Cell number) will turn it into "GEEKSFORGEEKS".
How to Use UPPER() Function in Excel
Step 1: Enter text into the sheet
Step 2: Click on the cell where you want the result
Step 3: Write the Function
=UPPER(B2)
Step 4: Preview Result

LOWER() Function
Conversely, LOWER() does the opposite. It converts text to all lowercase letters. So, "GEEKSFORGEEKS" becomes "geeksforgeeks" with =LOWER(Cell Number).
How to Use the Lower() Function in Excel
Step 1: Enter the data into the Sheet
Step 2: Select the Cell where you wants the result
Step 3: Use Formula
=LOWER(B2)
Step 4: Preview Result

PROPER() Function
Now, PROPER() is a bit more sophisticated. It capitalizes the first letter of each word in your text. For instance, if you input "GEEKSFORGEEKS" into a cell, =PROPER(Cell number) will give you "Geeksforgeeks".
How to Use Proper Function in Excel
Step 1: Enter the Data into the sheet
Step 2: Select the cell where you want the result
Step 3: Use Function
=PROPER(B2)
Step 4: Preview Results

How to Convert Text case with VBA Macro
VBA, or Visual Basic for Applications, is like the behind-the-scenes wizardry of Excel. It lets you write custom programs, called macros, to automate tasks, including text manipulation.
What is VBA(Visual Basic for Applications)?
VBA is a programming language built into Excel that allows you to create customized solutions for specific tasks. It's like giving Excel superpowers!
How to Write a VBA Macro for Text Case Conversion
You don't need to be a coding expert, don't worry. Writing a simple VBA macro for changing text cases is quite straightforward. You essentially tell Excel what you want it to do with your text.
Creating and Running a Simple VBA Macro
- First, you open the VBA editor in Excel by pressing Alt + F11
- Then, you write a short script that tells Excel to convert text to uppercase, lowercase, or whatever you need
- Finally, you run the macro, and voila! Your text case has been changed.
Flexibility and Power
The beauty of VBA is its flexibility and power. You can create macros to handle complex text formatting tasks, customize them to suit your exact needs, and even integrate them with other Excel functions and features.
Change Case:
Sub ChangeCase()
Dim rng As Range
Dim cell As Range
Set rng = Selection
For Each cell In rng
cell.Value = UCase(cell.Value)
Next cell
End Sub
Replace Text:
Sub ReplaceText()
Dim rng As Range
Dim cell As Range
Set rng = Selection
For Each cell In rng
cell.Value = Replace(cell.Value, "old text", "new text")
Next cell
End Sub
Drawbacks and Complexities
- However, using VBA for text case conversion might not be as straightforward as the other methods.
- It requires some basic programming knowledge, and creating more advanced macros can be time-consuming.
- Also, macros can sometimes behave unexpectedly if not written correctly.
But if you're willing to invest a little time to learn, VBA opens up a world of possibilities for automating tasks in Excel, including text case conversion. And once you have your macro set up, you can reuse it over and over again, saving you time and effort in the long run.
Conclusion
In conclusion, mastering text case formatting in Excel is key to maintaining consistency and readability in your spreadsheets. Whether you're dealing with large datasets or crafting detailed reports, ensuring that your text is properly formatted can greatly enhance the professionalism and clarity of your documents.
FAQs - Ways to Change the Case of Texts in MS Excel
How do you change the case of text in Excel?There are two main ways to change text case in Excel,
- Use special codes: These are like shortcuts (formulas) you type in Excel that tell it to change all caps to lowercase, lowercase to all capitals, or just capitalize the first letter of each word.
- Built-in options: Excel itself has tools hidden away to change capitalization. You just pick the text you want to change, then find the option for uppercase, lowercase, or proper case (first letter capitalized).
What is the shortcut for changing text cases in Excel?
The shortcut for changing text case in Excel is:
"Ctrl + Shift + [desired text case letter]"
For example:
- "Ctrl + Shift + U" for UPPERCASE
- "Ctrl + Shift + L" for lowercase
- "Ctrl + Shift + P" for Proper case
How do I change a case in Excel without a formula?
You can change the case in Excel without using formulas by using the built-in text case options.