Menu
×
   ❮   
HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP C C++ C# AWS W3.CSS HOW TO BOOTSTRAP REACT MYSQL JQUERY EXCEL XML DJANGO NUMPY PANDAS NODEJS DSA TYPESCRIPT ANGULAR ANGULARJS GIT POSTGRESQL MONGODB ASP AI R GO KOTLIN SWIFT SASS VUE GEN AI SCIPY CYBERSECURITY DATA SCIENCE INTRO TO PROGRAMMING HTML & CSS BASH RUST TOOLS

Excel Tutorial

Excel HOME Excel Introduction Excel Get Started Excel Overview Excel Syntax Excel Ranges Excel Fill Excel Move Cells Excel Add Cells Excel Delete Cells Excel Undo Redo Excel Formulas Excel Relative Reference Excel Absolute Reference Excel Arithmetic Operators Excel Parentheses Excel Functions

Excel Formatting

Excel Formatting Excel Format Painter Excel Format Colors Excel Format Fonts Excel Format Borders Excel Format Numbers Excel Format Grids Excel Format Settings

Excel Data Analysis

Excel Sort Excel Filter Excel Tables Excel Conditional Format Excel Highlight Cell Rules Excel Top Bottom Rules Excel Data Bars Excel Color Scales Excel Icon Sets Excel Manage Rules (CF) Excel Charts

Excel PivotTables

Excel PivotTable Intro Excel Create PivotTable Excel PivotTable Values Excel PivotTable Filter Excel PivotTable Group Excel Calculated Field Excel PivotChart

Excel Case

Case: Poke Mart Case: Poke Mart, Styling

Excel Functions

AND AVERAGE AVERAGEIF AVERAGEIFS CONCAT COUNT COUNTA COUNTBLANK COUNTIF COUNTIFS DATEDIF FILTER HLOOKUP IF IFERROR IFS INDEX INDEX MATCH LEFT LEN LOWER MATCH MAX MEDIAN MID MIN MODE NETWORKDAYS NPV OR PROPER RAND RIGHT ROUND SORT STDEV.P STDEV.S SUBSTITUTE SUM SUMIF SUMIFS SUMPRODUCT TEXTJOIN TODAY TRIM UNIQUE UPPER VLOOKUP XLOOKUP XOR

Excel How To

Convert Time to Seconds Difference Between Times NPV (Net Present Value) Remove Duplicates

Excel Cert

Excel Certificate

Excel Examples

Excel Exercises Excel Syllabus Excel Study Plan Excel Training

Excel References

Excel Keyboard Shortcuts


Excel UPPER Function


Share

UPPER Function

The UPPER function is a premade function in Excel, which changes all the letters in a text to uppercase (capital letters).

Digits, spaces and symbols are not changed.

It is typed =UPPER and has one part:

=UPPER(text)

Text: The text to change. This is usually a cell, like A2.

UPPER does the opposite of LOWER. To capitalize only the first letter of each word, use PROPER.

How to use the UPPER function:

  1. Select a cell (B2)
  2. Type =UPPER
  3. Double click the UPPER command
  4. Select the cell with the text (A2)
  5. Hit enter

Let's have a look at an example!

The Poke Mart item codes should be in capital letters, like PKB-0200-BALL. But some codes were typed in lowercase or mixed case. Copy them and paste them into cell A1 to follow along:

Example data

AB
1Typed CodeCode
2pkb-0200-ball
3Grb-0600-Ball
4ULB-1200-ball
5pot-0300-meds
6Spt-0700-Meds
7HPT-1200-MEDS
8rev-1500-MEDS
9ant-0100-stat

Use the UPPER function to fix the codes, in column B:

AB
1Typed CodeCode
2pkb-0200-ballPKB-0200-BALL
3Grb-0600-BallGRB-0600-BALL
4ULB-1200-ballULB-1200-BALL
5pot-0300-medsPOT-0300-MEDS
6Spt-0700-MedsSPT-0700-MEDS
7HPT-1200-MEDSHPT-1200-MEDS
8rev-1500-MEDSREV-1500-MEDS
9ant-0100-statANT-0100-STAT
=UPPER(A2)

The function is repeated with the filling function for each row, down to B9.

All the letters are now uppercase. The digits and the dashes stay the same. HPT-1200-MEDS was already in uppercase, so it does not change.

Note: In Excel for Microsoft 365 and Excel 2021 or later, you can also type =UPPER(A2:A9) in B2. The results then spill down to B9 by themselves.

The codes in column B are formulas. To replace the typed codes with the fixed ones, copy B2:B9 and paste them into A2:A9 as values. Right click A2 and choose Values under Paste Options. Then you can delete column B.



Check if a Text is Uppercase

An equal sign = does not see the difference between uppercase and lowercase. =A2=UPPER(A2) returns TRUE, even when A2 is all lowercase.

Use the EXACT function instead. EXACT compares two texts, and returns TRUE only if they are exactly the same, including uppercase and lowercase letters.

Type the labels Is Uppercase in C1 and Equal Sign in D1. Then fill both formulas down to row 9:

ACD
1Typed CodeIs UppercaseEqual Sign
2pkb-0200-ballFALSETRUE
3Grb-0600-BallFALSETRUE
4ULB-1200-ballFALSETRUE
5pot-0300-medsFALSETRUE
6Spt-0700-MedsFALSETRUE
7HPT-1200-MEDSTRUETRUE
8rev-1500-MEDSFALSETRUE
9ant-0100-statFALSETRUE

The formula in C2:

=EXACT(A2, UPPER(A2))

The formula in D2:

=A2=UPPER(A2)

Only HPT-1200-MEDS was typed in uppercase, so EXACT returns TRUE only for that code. The equal sign returns TRUE for all of them.

Note: The different parts of the function are separated by a symbol, like comma , or semicolon ;

The symbol depends on your Language Settings.


Make Codes From Names

Combine UPPER with LEFT to make short codes from names. LEFT takes the first characters, and UPPER changes them to capital letters.

Type these Pokemon names in A2:A6 of a new sheet:

AB
1NameCode
2BulbasaurBUL
3CharmanderCHA
4SquirtleSQU
5PikachuPIK
6EeveeEEV
=UPPER(LEFT(A2, 3))

LEFT takes the first 3 characters of each name, and UPPER makes them uppercase. Bulbasaur becomes BUL, and Pikachu becomes PIK.


Related Functions

UPPER is one of three functions that change the letter case, together with LOWER and PROPER. To remove extra spaces as well, use TRIM.


Free account

Track your progress

XP earned 0 Day streak 0 Spaces 0 League —

New

Learn in Adventure Mode W3Schools Adventure App

Coding fundamentals as bite-sized lessons and challenges.

×

Contact Sales

If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail:
sales@w3schools.com

Report Error

If you want to report an error, or if you want to make a suggestion, send us an e-mail:
help@w3schools.com

W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. While using W3Schools, you agree to have read and accepted our terms of use, cookies and privacy policy.

Copyright 1999-2026 by Refsnes Data. All Rights Reserved. W3Schools is Powered by W3.CSS.