Excel UPPER Function: How to Convert Text to Uppercase
In this article
The UPPER function in Excel converts any text value to all capitals. The syntax is =UPPER(text), where text is the cell you want to change or a string in quotes. For example, =UPPER(A2) turns "john smith" into "JOHN SMITH". Excel also has a one-click button for this: select your cells, then go to the Home tab and click the Aa icon. Changes made with the function appear in a new cell, while the button edits your existing text in place.
What You'll Need
- Excel on Windows, Mac, or the web (the function works the same way in all versions)
- Text in one column that you want to capitalise
- An empty column next to your data to hold the results, if you use the formula method
Step-by-Step
- Decide on a method. Use the formula if you want to keep the original text alongside the capitals, or if the capitals need to update automatically when the source changes. Use the Aa button if you want to overwrite the text permanently and only need it once.
- Place your cursor in an empty cell beside the first row of text you want to convert. For example, if your names are in A2 down to A50, click cell B2.
- Type the formula. Enter
=UPPER(A2)and press Enter. The result in B2 shows the contents of A2 in capitals. If you want to convert a string you type directly, use=UPPER("hello world"), which returns HELLO WORLD. - Copy the formula down. Click B2, then drag the small square at the bottom-right corner of the cell border down to the last row, or double-click that square to fill down automatically. Each row now shows the capitalised version of the cell to its left.
- Check the results. Scroll through the column to confirm the capitals look right and that no cells return errors such as #VALUE! or #NAME?.
- Convert the formulas to plain values (optional but recommended if you plan to delete the originals). Select the whole results column, press Ctrl+C (Cmd+C on Mac), then right-click and use Paste Special > Values. The formulas are replaced by static text, so the capitals survive even if you remove the source column.
- Delete the original column if you no longer need it. Once the values are pasted in place, you can safely remove the source column without breaking the results. Clear the leftover formulas first, then right-click the column header and choose Delete.
- Alternative: use the Aa button. Select the cells containing the text, go to the Home tab, and click the Aa icon (labelled Change Case in the tooltip). Choose UPPERCASE from the small menu. The text in those cells is replaced with capitals immediately, with no formula involved.
If you have several cells to convert in one shot without formulas, select them all before using the Aa button. Excel processes every selected cell at once. Note that the Aa icon is not available in every Excel version or view, so if you cannot find it, the UPPER formula is the reliable fallback.
Common Mistakes
- Forgetting to save values before deleting the source. If you delete column A while column B still contains
=UPPER(A2), every result turns into a #REF! error. Paste as values first. - Quoting a cell reference. Writing
=UPPER("A2")with quotes returns the literal text A2, not the contents of the cell. Leave cell references unquoted. - Comparing UPPER results to text with mixed case.
=UPPER(A2)="Yes"is always FALSE, because UPPER returns YES. Either compare to "YES" or wrap both sides in UPPER. - Expecting UPPER to change numbers. The function only affects letters. Numbers, spaces and punctuation pass through unchanged, so
=UPPER(123)simply returns 123. - Typing directly into the source cell with the Aa button on a multiple selection. Confirm what is selected before you click the icon, or you could convert cells you did not mean to touch.
Tips
- UPPER ignores anything that is already capitalised, so it is safe to run on a whole column repeatedly.
- Combine it with TRIM to clean up extra spaces at the same time:
=TRIM(UPPER(A2))removes leading and trailing spaces before capitalising. - Use it inside comparison formulas to make checks case-insensitive. For example,
=IF(UPPER(A2)="YES","Confirmed","")matches yes, Yes, yES and YES alike. - For a mixed result, such as capitalising only the first letter of each word, use PROPER instead of UPPER.
- Keep a helper column rather than overwriting your data. You can always hide the column or paste plain values later if you prefer a clean sheet.
Troubleshooting
The formula returns a #NAME? error. This usually means the function name was mistyped, or the cell was entered as text. Check that you typed UPPER with no spaces, then press F2 and re-enter the formula if needed.
The formula returns #VALUE!. This means a cell in the referenced range contains an error or an unexpected type. Click the cell with the error and check the original data. Text stored as numbers, dates and similar values can behave unexpectedly in some combinations, so test with a simple text cell first.
The result looks unchanged. Make sure the cell is not formatted as text before you entered the formula. Select the cell, go to Home > Number and choose General, then re-enter the formula. Also confirm the referenced cell actually contains lowercase letters.
The formula shows as text instead of calculating. If the cell displays =UPPER(A2) rather than a result, the cell is formatted as text or the formula is being treated as a string. Change the format to General and re-enter it.
The Aa button is missing. Not all Excel views and versions show it. Use the UPPER formula instead, which works everywhere. If you must use the button, check that you are on the Home tab and have a cell selected.
Results disappear when you edit the source column. This is expected when the source cell is cleared. Paste the results as values before removing or editing the original data.
Frequently Asked Questions
Does UPPER change the original cell?
No. The function returns a new value in the cell where you put the formula. The original cell stays exactly as it was. To change the original, use the Aa button or paste the formula results back over the source as values.
Can I convert a whole column at once?
Yes. Enter the formula in the first cell of your helper column, then fill it down to the last row. Every cell is converted in one pass. Alternatively, select the whole column and use the Aa button on the Home tab.
Does UPPER work on numbers and punctuation?
It leaves them untouched. Only letters are affected, so figures, spaces, hyphens and symbols pass through unchanged. This makes it safe to run on addresses or codes that mix text and numbers.
What is the difference between UPPER, LOWER and PROPER?
UPPER converts everything to capitals, LOWER converts everything to lowercase, and PROPER capitalises the first letter of each word. All three use the same simple syntax with a cell reference or text string.
Can I use UPPER in an IF formula?
Yes. Wrap the cell reference in UPPER inside the IF test, so comparisons ignore case. For example, =IF(UPPER(A2)="YES","Confirmed","No") treats yes, Yes and YES as the same answer. Remember to write the comparison text in capitals too.
Does UPPER work in Google Sheets and Excel Online?
Yes. UPPER is available in both, and the syntax is identical to desktop Excel. The Aa button may be labelled differently or sit in a different place in these versions, so the formula method is the most consistent approach across platforms.