What it does
UPPER takes a single argument and returns an upper-case copy of the text; the source cell does not change. Hand-typed lists often contain the same code as "kbl-1525", "Kbl-1525" and "KBL-1525". Convert them in a new column with UPPER, then sort, match or summarise the clean values.
Excel's comparisons and lookup functions (VLOOKUP, COUNTIF) already ignore case, so UPPER is mostly about appearance, reports and exports. To compare with case, use EXACT; to capitalise only the first letter of each word, use PROPER.
Case conversion depends on the language for a few letters. In Turkish, the capital of i is İ (with a dot), so on a computer with Turkish language settings Excel can return a different result for words containing i. For English text on an English system this never matters.
Syntax
=UPPER(text)=BÜYÜKHARF(metin)Arguments in square brackets are optional. English Excel separates arguments with commas (,) and uses a dot for decimals; Turkish Excel uses semicolons (;) and a decimal comma. Excel shows function names in its own language when it opens the file.
Arguments
| Argument | Required | Description |
|---|---|---|
text | Required | The text, or cell, to convert. Digits, spaces and symbols stay as they are; a number returns its text form. |
Examples
1Convert product codes typed in different cases
Codes were typed by different people in different cases. Column B converts all of them to upper case; digits and hyphens do not change.
=UPPER(A2)| A | B | |
|---|---|---|
| 1 | Code as Typed | Code |
| 2 | kbl-1525 | KBL-1525 |
| 3 | Prz-0210 | PRZ-0210 |
| 4 | SGT-0016 | SGT-0016 |
| 5 | knl-2040 | KNL-2040 |
| 6 | Anh-0300 | ANH-0300 |
- B2 (filled down to B6)
=UPPER(A2)
B2 shows KBL-1525 and B3 shows PRZ-0210. SGT-0016, already in capitals, stays as it is.
We recalculated this example in real Excel (Microsoft 365, 16.0) and compared the results: they match.
2Clean and capitalise city names
City names were typed with stray spaces and in lower case. TRIM removes the spaces and UPPER capitalises what is left.
=UPPER(TRIM(A2))| A | B | |
|---|---|---|
| 1 | City | In Capitals |
| 2 | london | LONDON |
| 3 | leeds | LEEDS |
| 4 | york | YORK |
| 5 | bath | BATH |
| 6 | hull | HULL |
- B2 (filled down to B6)
=UPPER(TRIM(A2))
B2 shows LONDON and B5 shows BATH, without the spaces that were around them.
We recalculated this example in real Excel (Microsoft 365, 16.0) and compared the results: they match.
3Find codes not written in capitals
EXACT compares texts with case. If a code is identical to its upper-case version, it is already in capitals.
=IF(EXACT(A2,UPPER(A2)),"OK","Fix")| A | B | |
|---|---|---|
| 1 | Code | Status |
| 2 | KBL-1525 | OK |
| 3 | Prz-0210 | Fix |
| 4 | SGT-0016 | OK |
| 5 | knl-2040 | Fix |
- B2 (filled down to B5)
=IF(EXACT(A2,UPPER(A2)),"OK","Fix")
Prz-0210 and knl-2040 show Fix; the others show OK. Filter this column to see the codes that need fixing together.
We recalculated this example in real Excel (Microsoft 365, 16.0) and compared the results: they match.
Common errors and fixes
- Still no match
Cause: Converting to upper case does not remove invisible spaces; "KBL-1525 " and "KBL-1525" are still different texts.
Fix: Use both functions together:
=UPPER(TRIM(A2)).- Result is not a number
Cause: UPPER always returns text, so applying it to a column of numbers turns them into text.
Fix: Use UPPER only on text columns; leave number columns as they are.
Good to know
- To fix the source column for good, copy the formula results and paste them over the source with Paste Values; then delete the helper column.
- To accept only upper-case entries in a cell, use a Custom Data Validation rule:
=EXACT(A2,UPPER(A2)).
In Nexell
Get Nexell to do it from a sentence
Add a new Code column that converts product codes to upper case and removes stray spaces
Convert to tableBring your list into the tool and type this. Nexell writes the cleaned codes into a new column and shows them in a preview first; the source column stays as it is.
Nexell uses AI to understand the request and builds the result with real Excel formulas; the formula may differ from the example on this page. You see a preview first and nothing changes until you press Apply; formulas stay live in the downloaded .xlsx file.
Free account · no card needed · 30 credits a month
Frequently asked questions
How do I change a whole column to upper case in Excel?
Add an empty column next to it, type =UPPER(A2) in the first row and fill it down. Then copy that column, paste it over column A with Paste Values, and delete the helper column.
Is there a keyboard shortcut for upper case in Excel?
No; unlike Word, Excel has no shortcut that changes the case of a cell. Use UPPER in a helper column, or Flash Fill (Ctrl+E) after typing one example by hand.