The UPPER function
UPPER returns the same text with every letter in capitals. It's the quickest way to tidy postcodes, country codes and product codes that were typed any old way.
Digits, spaces and symbols don't change, so ls1 4dy becomes LS1 4DY.
=UPPER(text)
Arguments
- text
- The text (or cell) to convert. Numbers and punctuation are left as they are.
Try it
=UPPER(A2) in C2. Every letter becomes a capital; the digits and the space are unchanged.
C2
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Postcode as typed | Country | Tidy postcode | |
| 2 | ls1 4dy | gb | LS1 4DY | |
| 3 | Cf10 1ep | Gb | ||
| 4 | g2 3bz | ie | ||
| 5 | ||||
| 6 |
Edit the formula in C2, or change the data, and press Enter.
More examples
| Formula | Result | What it does |
|---|---|---|
| =UPPER(A3) | CF10 1EP | Mixed case is fixed just the same. |
| =UPPER(TRIM(A4)) | G2 3BZ | TRIM removes the leading spaces first, so the result is fully clean. |
| =UPPER(B2)&"-"&UPPER(A2) | GB-LS1 4DY | Build a consistent label from two untidy cells. |
Tips
- Clean a whole column by writing UPPER in a helper column, filling it down, then pasting the results back as values.
- Comparisons with
=already ignore case, so you don't need UPPER just to compare two cells. Use it when the text itself must look consistent. - Combine UPPER with TRIM for codes typed by hand:
=UPPER(TRIM(A2)).
Common mistakes
- You typed `=UPPER(A2)` into A2 itself.That's a circular reference. Put the formula in a new column, then paste values back over the original if you want.
- The tidy column goes blank when the original column is deleted.The formulas still point at the old cells. Copy and Paste Special > Values first, then delete the original.
- Postcodes still don't match after UPPER.Check for extra or missing spaces as well as case. Wrap with TRIM, or remove spaces with SUBSTITUTE when comparing.
Practise UPPER with instant feedback
Type real formulas into a working spreadsheet and get told straight away whether they work.