Skip to content

Excel function · Text

Excel UPPER function

UPPER converts every letter in a text to upper case and leaves digits and symbols alone. It is used to make product codes, postcodes and city names consistent.

In Turkish Excel: BÜYÜKHARF

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

English Excel=UPPER(text)
Turkish Excel=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

ArgumentRequiredDescription
textRequiredThe 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.

B2fx=UPPER(A2)
Convert product codes typed in different cases: example table
AB
1Code as TypedCode
2kbl-1525KBL-1525
3Prz-0210PRZ-0210
4SGT-0016SGT-0016
5knl-2040KNL-2040
6Anh-0300ANH-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.

B2fx=UPPER(TRIM(A2))
Clean and capitalise city names: example table
AB
1CityIn Capitals
2 londonLONDON
3leeds LEEDS
4yorkYORK
5 bath BATH
6hullHULL
  • 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.

B2fx=IF(EXACT(A2,UPPER(A2)),"OK","Fix")
Find codes not written in capitals: example table
AB
1CodeStatus
2KBL-1525OK
3Prz-0210Fix
4SGT-0016OK
5knl-2040Fix
  • 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

Type this in Nexell

Add a new Code column that converts product codes to upper case and removes stray spaces

Convert to table

Bring 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.

Related functions

All text functions →

Stop memorising formulas. Describe them.

Bring your table into the tool and say what you need; Nexell builds the formula and shows it in a preview.

Try it free