UPPER
HOOFDLETTERS in Dutch Excel
Converts every letter in a text to uppercase and leaves digits, spaces and punctuation as they are.
Last updated: 13 October 2026
| Row | A | B | C | D |
|---|---|---|---|---|
| 1 | Journal as typed | Entry no. | Amount | Journal |
| 2 | vrk | 25-0412 | €12,100.00€ 12.100,00 | VRK=UPPER(A2)=UPPER(A2) |
| 3 | Ink | 25-0413 | €3,025.00€ 3.025,00 | |
| 4 | BNK | 25-0414 | €8,470.00€ 8.470,00 | |
| 5 | mem | 25-0415 | €1,500.00€ 1.500,00 | |
| 6 | Vrk | 25-0416 | €6,050.00€ 6.050,00 |
Swipe sideways to see all columns
Result: VRK
=UPPER(A2)
=UPPER(A2)
What UPPER does and when to use it
What it does: it turns every letter of a text into a capital, for example ink-25 into INK-25. Digits, spaces and hyphens stay as they are.
When to use it: for codes that people type by hand, such as product codes or batch numbers, when the text goes to a case-sensitive system, is compared with EXACT or searched with FIND, or a list has to look uniform. Lookups and COUNTIF ignore case, so a lookup rarely needs it. For names and titles, PROPER is the better tool.
How Excel evaluates it
Excel reads the argument. If it is a cell reference, it takes the cell's value; if the cell is empty, the result is an empty text.
It then walks through the text character by character: each lowercase letter is replaced by its uppercase form, including accented letters such as é, and every other character is copied as it is. The result is always text, even when the input was a number, and it is a new value: the original cell is not changed.
Watch out: Excel's = and <> ignore case, so =UPPER(A2)=UPPER(B2) and A2<>UPPER(A2) can never reveal a difference in capitals; use EXACT for that.
Mental model
It is the Caps Lock key applied to a cell: only letters react to it.
UPPER(text)
UPPER(text)
| Argument | Type | Meaning |
|---|---|---|
text | Required | The text to convert; a cell reference or text in quotes. |
Return value:Text: the text in uppercase
Formulas use commas (,) between arguments, as in English Excel. Formulas use semicolons (;) between arguments, as in Dutch Excel. Formulas use commas (,) between arguments, as in English Excel; Dutch Excel uses semicolons (;).
Worked examples
Beginner
Make journal codes uniform
In the XAF auditfile of Veldhuis Installatie BV, manual entries carry journal codes typed by different people: vrk, Ink, BNK, mem. You want to count and total the entries per journal in a pivot table, and the pivot should show one group for VRK, not several spellings. You add a column that shows every journal code in capitals.
| Row | A | B | C | D | E |
|---|---|---|---|---|---|
| 1 | Journal as typed | Entry no. | Amount | Journal | |
| 2 | vrk | 25-0412 | €12,100.00€ 12.100,00 | VRK=UPPER(A2)=UPPER(A2) | |
| 3 | Ink | 25-0413 | €3,025.00€ 3.025,00 | ||
| 4 | BNK | 25-0414 | €8,470.00€ 8.470,00 | ||
| 5 | mem | 25-0415 | €1,500.00€ 1.500,00 | ||
| 6 | Vrk | 25-0416 | €6,050.00€ 6.050,00 | ||
| 7 |
Swipe sideways to see all columns
Formula in D2
=UPPER(A2)
=UPPER(A2)
Result: VRK
Step by step
- Excel reads
A2and finds the textvrk, three characters long. - It goes through the characters one by one: v becomes V, r becomes R, k becomes K. All three are letters, so all three change.
- The result in
D2isVRK.A2still holdsvrk; UPPER made a new value and did not edit the source, so the export stays as you received it. - Copy
D2down toD6:InkbecomesINK,BNKstaysBNK,membecomesMEMandVrkbecomesVRK. Rows 2 and 6 now show the same code, so a pivot table on column D groups them:VRKholds 12,10012.100 + 6,0506.050 = 18,15018.150.
Watch out: If A2 is empty, D2 shows an empty text, not 0. That is fine for display, but COUNTA counts the cell as filled, so a count of journal lines can come out too high.
More on this example: why it works, 1 variation
Why it works
UPPER only touches letters, so a code keeps its shape and the digits and hyphens around it stay as they were. Because the result is a new text value, you keep the typed version as evidence of what the client delivered and use the clean column for your analysis.
Variations
=UPPER(A2:A6)
=UPPER(A2:A6)
In Excel 2021 or Microsoft 365 one formula in D2 spills all five codes at once; there is nothing to copy down.
Intermediate
Clean relation codes before matching to the subledger
You reconcile the open items of the receivables and payables aging list to the general ledger. The client typed the relation codes by hand: d1001, C2001, and some with a stray space at the start or the end. The subledger lists D1001 and C2001 in capitals without spaces, and your case-sensitive matching tool rejects every row that differs.
You want a column with codes that match, without retyping anything.
| Row | A | B | C | D | E |
|---|---|---|---|---|---|
| 1 | Relation as typed | Invoice no. | Open amount | Relation | |
| 2 | d1001 | F2025-0871 | €4,235.00€ 4.235,00 | D1001=UPPER(TRIM(A2))=UPPER(TRIM(A2)) | |
| 3 | C2001 | F2025-0412 | €1,815.00€ 1.815,00 | ||
| 4 | d1003 | F2025-0905 | €9,680.00€ 9.680,00 | ||
| 5 | c2004 | F2025-0377 | €605.00€ 605,00 | ||
| 6 | D1001 | F2025-0918 | €2,420.00€ 2.420,00 | ||
| 7 |
Swipe sideways to see all columns
Formula in D2
=UPPER(TRIM(A2))
=UPPER(TRIM(A2))
Result: D1001
Step by step
- Excel evaluates the inner function first. TRIM reads
A2, which holds a space followed byd1001, six characters, and removes the leading space:d1001. - UPPER receives
d1001and converts the only letter:D1001. D2showsD1001, five characters, the same as the code in the subledger.- Without TRIM the formula would return a space followed by
D1001, six characters. It looks right in the cell and the matching tool still rejects it, which is why the space has to go first. - Copy
D2down:C2001staysC2001,d1003with its trailing space becomesD1003,c2004becomesC2004, andD1001with a trailing space becomesD1001. Row 2 and row 6 now carry the same relation code, so you can add up the open items per relation.
Watch out: A non-breaking space copied from a PDF or a web portal survives TRIM. If a cleaned code still has six characters, check with LEN and read the TRIM page for the fix.
More on this example: why it works, 1 more pitfall, 1 variation
Why it works
Two problems, two functions, applied inside out: TRIM deals with the spaces, UPPER with the case. This is the situation where case actually matters: not for Excel, which would match d1001 and D1001 happily, but for the tool or system that receives your file.
More to watch out for
- UPPER does not validate: a typo like D1O01 (letter O instead of zero) stays D1O01 and matches no relation. Compare the result against the relation list with COUNTIF and follow up the codes that return 0.
Variations
=TRIM(UPPER(A2))
=TRIM(UPPER(A2))
The order does not matter here, because neither function touches what the other changes. Cleaning first is the convention, so the next reader sees the cleaning step first.
Advanced
Count the invoice numbers not yet in capitals
You match the invoices of the payables subledger to the general ledger in a tool that treats f2025-0872 and F2025-0872 as two different invoices, so they would show up as differences.
Before you load the list you want one number: how many invoice numbers are not fully in capitals yet. The obvious test, A2<>UPPER(A2), returns FALSE for every row, because <> ignores case; EXACT does not.
| Row | A | B | C | D | E |
|---|---|---|---|---|---|
| 1 | Invoice no. | Amount | Rows to fix | ||
| 2 | F2025-0871 | €4,235.00€ 4.235,00 | 33=SUMPRODUCT(1 - EXACT(A2:A7, UPPER(A2:A7)))=SUMPRODUCT(1 - EXACT(A2:A7; UPPER(A2:A7))) | ||
| 3 | f2025-0872 | €1,815.00€ 1.815,00 | |||
| 4 | F2025-0873a | €9,680.00€ 9.680,00 | |||
| 5 | F2025-0874 | €605.00€ 605,00 | |||
| 6 | F2025-0875 | €2,420.00€ 2.420,00 | |||
| 7 | f2025-0876 | €7,260.00€ 7.260,00 | |||
| 8 |
Swipe sideways to see all columns
Formula in D2
=SUMPRODUCT(1 - EXACT(A2:A7,UPPER(A2:A7)))
=SUMPRODUCT(1 - EXACT(A2:A7;UPPER(A2:A7)))
Result: 33
Step by step
- Excel starts with the innermost function. UPPER(A2:A7) produces a six-item array:
F2025-0871,F2025-0872,F2025-0873A,F2025-0874,F2025-0875,F2025-0876. - EXACT compares each original with its uppercase version, case-sensitively:
F2025-0871equalsF2025-0871, TRUE;f2025-0872againstF2025-0872, FALSE;F2025-0873aagainstF2025-0873A, FALSE; then TRUE, TRUE, FALSE. The array is {TRUE;FALSE;FALSE;TRUE;TRUE;FALSE}. - 1 - TRUE is 0 and 1 - FALSE is 1, so the subtraction turns the array into {0;1;1;0;0;1}: a 1 for every row that needs fixing.
- SUMPRODUCT adds the array: 0 + 1 + 1 + 0 + 0 + 1 = 3.
D2shows 3. - Fix
A3toF2025-0872and the count drops to 2 without touching the formula.
Watch out: =SUMPRODUCT(--(A2:A7<>UPPER(A2:A7))) looks equivalent and silently returns 0 for any data, because <> compares without regard to case. There is no error to warn you, and you would report a clean list that is not clean.
More on this example: why it works, 1 more pitfall, 2 variations
Why it works
EXACT is one of the few places in Excel where case counts, so comparing a value with its own uppercase version tells you whether it was already in capitals. The subtraction from 1 does two jobs at once: it flips the logic (1 means wrong) and converts TRUE/FALSE into numbers that SUMPRODUCT can add.
More to watch out for
- A row with a trailing space counts as correct: EXACT compares
F2025-0871followed by a space with its uppercase version, which has the same space. Combine with TRIM if spaces are also a problem.
Variations
=IF(EXACT(A2,UPPER(A2)), "OK", "Fix")
=IF(EXACT(A2;UPPER(A2)); "OK"; "Fix")
The per-row version: put it in C2 and copy down to see which rows are wrong, not only how many.
=SUMPRODUCT(--NOT(EXACT(A2:A7,UPPER(A2:A7))))
=SUMPRODUCT(--NOT(EXACT(A2:A7;UPPER(A2:A7))))
Same result with NOT and the double minus; longer, but the intent reads like a sentence.
MasterExcel 2021 or later (This example needs Excel 2021 or later)
Uppercase mixed payment references without breaking the numbers
You match the receipts on the bank statement to the open receivables. The payment reference column holds numeric references from the old system, such as 88123, mixed with text references from the new one, such as inv-2041.
The matching file needs the text ones in capitals and trimmed, but the numbers must stay numbers, because your XLOOKUP against the receivables list searches for numeric keys. A plain UPPER would quietly turn 88123 into the text 88123, and every numeric key would come back as not found.
| Row | A | B | C | D | E |
|---|---|---|---|---|---|
| 1 | Reference | Amount | Clean reference | ||
| 2 | inv-2041 | €1,210.00€ 1.210,00 | INV-2041=LET( refs, A2:A7, isText, ISTEXT(refs), IF(isText, UPPER(TRIM(refs)), refs) )=LET( refs; A2:A7; isText; ISTEXT(refs); IF(isText; UPPER(TRIM(refs)); refs) ) | ||
| 3 | 8812388123 | €450.50€ 450,50 | 8812388123 | ||
| 4 | Inv-2044 | €3,100.00€ 3.100,00 | INV-2044 | ||
| 5 | 8813088130 | €990.00€ 990,00 | 8813088130 | ||
| 6 | inv-2046 | €122.25€ 122,25 | INV-2046 | ||
| 7 | INV-2050 | €5,000.00€ 5.000,00 | INV-2050 | ||
| 8 |
Swipe sideways to see all columns
Formula in D2
=LET( refs,A2:A7, isText, ISTEXT(refs), IF(isText, UPPER(TRIM(refs)), refs) )
=LET( refs;A2:A7; isText; ISTEXT(refs); IF(isText; UPPER(TRIM(refs)); refs) )
Result: INV-2041 / 88123 / INV-2044 / 88130 / INV-2046 / INV-2050INV-2041 / 88123 / INV-2044 / 88130 / INV-2046 / INV-2050
Step by step
- LET names the range
A2:A7refs. Nothing is calculated yet; the name is a label for the six cells. - isText is ISTEXT(refs), evaluated for every cell: {TRUE;FALSE;TRUE;FALSE;TRUE;TRUE}. The two numbers,
88123and88130, are the FALSE entries. - IF evaluates both branches as arrays. For the TRUE rows it takes UPPER(TRIM(refs)):
inv-2041becomesINV-2041,Inv-2044becomesINV-2044, the space beforeinv-2046is removed and the rest becomesINV-2046, andINV-2050is unchanged. - For the FALSE rows IF returns refs itself, so
88123and88130come through as the numbers they were. UPPER never sees them. - The result is a six-row array that spills from
D2toD7.D3andD5are right-aligned numbers; =COUNT(D2:D7) gives 2, one for88123and one for88130, which a column of text would count as 0. - Type
88140inA2andD2becomes the number88140; typeinv-2060andD2becomesINV-2060. The test runs per cell, every time.
Watch out: The mirror image, ISNUMBER(refs) as the test, swaps the branches: the numbers go to UPPER and become text, the text stays as typed. No error appears, and the matching looks fine until receipts you know exist come back as not found.
More on this example: why it works, 2 more pitfalls, 2 variations
Why it works
UPPER converts anything you give it to text, numbers and dates included; the only way to keep a number is to keep it away from UPPER. ISTEXT decides per cell, and IF with array arguments picks a branch per cell, so one formula handles a mixed column. LET makes the decision readable and evaluates the range once.
Do not use this construction when the whole column is text: =UPPER(TRIM(A2:A7)) does the same with less to read.
The alternative for recurring imports is the uppercase transformation in Power Query; it is cleaner for large files but only updates when you refresh, and in a column that mixes numbers and text you need to check what it does with the numbers before you rely on it.
More to watch out for
- A number stored as text (a leading apostrophe from an import) is text to ISTEXT, so it stays text. If those must become numbers, add VALUE for the rows that are digits only.
D2:D7must be empty before you enter the formula, otherwise you get #SPILL!.
Variations
=IF(ISTEXT(A2),UPPER(TRIM(A2)), A2)
=IF(ISTEXT(A2);UPPER(TRIM(A2)); A2)
The single-cell version to copy down, for workbooks that will be opened in Excel 2019 or older, where formulas do not spill.
=UPPER(TRIM(A2:A7))
=UPPER(TRIM(A2:A7))
When every reference is text: shorter, and there are no numbers to protect.
Common mistakes
| Symptom | Cause | Fix |
|---|---|---|
| #REF! after deleting the source column | You wrote =UPPER(A2) next to the column, then deleted column A, and the new column shows #REF!. | Copy the formula column and paste it as values before you remove the original. The formula only points at the source; it does not replace it. |
| Dates turn into numbers like 46112 | You used UPPER on a column of dates and got numbers like 46112 instead of dates. | A date is a number, and UPPER turns numbers into text. Leave dates alone, or format them with TEXT first if you need an uppercase month name. |
| UPPER on both sides changes nothing | You added UPPER to both sides of a comparison, =UPPER(A2)=UPPER(B2), expecting it to fix a mismatch, and nothing changed. | If two values still differ, the cause is something else:
Start with TRIM and LEN. |