TGViewer
MS Excel for Data Analysis MS Excel for Data Analysis @excel_analyst ยท 73.1K subscribers
Post #2260 3.26K
๐Ÿ“Š Excel Basics #28 โ€“ TRIM(), UPPER(), LOWER() & PROPER()

Raw data often contains extra spaces or inconsistent capitalization.

For example:

" rahul SHARMA "

This can create problems when filtering, matching, or analyzing data.

Excel provides several useful text-cleaning functions to fix these issues.

๐Ÿ“Œ 1. TRIM() Function

"TRIM()" removes unnecessary spaces from text.

Syntax:

=TRIM(text)

Example:

=TRIM(" Rahul Sharma ")

Result:

Rahul Sharma

It removes leading/trailing spaces and reduces multiple spaces between words to a single space.

๐Ÿ“Œ 2. UPPER() Function

"UPPER()" converts text to uppercase.

Example:

=UPPER("data analyst")

Result:

DATA ANALYST

Useful when you want consistent formatting for codes, categories, or headings.

๐Ÿ“Œ 3. LOWER() Function

"LOWER()" converts text to lowercase.

Example:

=LOWER("RAHUL@GMAIL.COM")

Result:

rahul@gmail.com

This is especially useful when standardizing email addresses or other text fields.

๐Ÿ“Œ 4. PROPER() Function

"PROPER()" capitalizes the first letter of each word.

Example:

=PROPER("rahul sharma")

Result:

Rahul Sharma

Useful for cleaning names, cities, departments, and other labels.

๐Ÿ“Œ Real-World Example

Suppose your raw data contains:

Raw Name
" rahul sharma"
"PRIYA PATEL"
"amit kumar"

Clean it using:

=PROPER(TRIM(A2))

Results:

Rahul Sharma

Priya Patel

Amit Kumar

Here, "TRIM()" removes unnecessary spaces and "PROPER()" standardizes capitalization.

๐Ÿ“Œ Combining Functions

You can combine these functions to clean data more effectively.

Example:

=UPPER(TRIM(A2))

This removes unnecessary spaces and converts the result to uppercase.

If:

"A2 = " power bi ""

Result:

POWER BI

๐Ÿ“Œ Real-World Uses

โ€ข Clean imported datasets.
โ€ข Standardize employee names.
โ€ข Clean customer information.
โ€ข Standardize email addresses.
โ€ข Prepare data before using lookup functions.
โ€ข Fix inconsistent categories.

๐Ÿ“Œ Important Tip

"TRIM()" removes regular spaces, but some data copied from websites or external systems may contain non-breaking spaces that "TRIM()" alone doesn't remove.

For such cases, you can use:

=TRIM(SUBSTITUTE(A2,CHAR(160)," "))

โœ… Quick Tip

"TRIM()" โ†’ Remove extra spaces

"UPPER()" โ†’ Convert to UPPERCASE

"LOWER()" โ†’ Convert to lowercase

"PROPER()" โ†’ Capitalize Each Word

Double Tap โค๏ธ For More
  • โค 12
More from @excel_analyst
  1. Oct 8, 2026๐ŸŽ“ ๐— ๐—ถ๐—ฐ๐—ฟ๐—ผ๐˜€๐—ผ๐—ณ๐˜ ๐—™๐—ฅ๐—˜๐—˜ ๐—–๐—ผ๐˜‚๐—ฟ๐˜€๐—ฒ๐˜€ ๐˜„๐—ถ๐˜๐—ต ๐—–๐—ฒ๐—ฟ๐˜๐—ถ๐—ณ๐—ถ๐—ฐ๐—ฎ๐˜๐—ฒ๐˜€! ๐Ÿš€๐Ÿ”ฅ Upgrโ€ฆ
  2. Oct 7, 2026๐Ÿ“Š Excel Shortcuts โ€” Part 5 This part focuses on Tables, Filters & Data Analysis shortcutsโ€ฆ
  3. Oct 7, 2026๐Ÿš€๐—ฃ๐—ฎ๐˜† ๐—”๐—ณ๐˜๐—ฒ๐—ฟ ๐—ฃ๐—น๐—ฎ๐—ฐ๐—ฒ๐—บ๐—ฒ๐—ป๐˜ ๐—ง๐—ฟ๐—ฎ๐—ถ๐—ป๐—ถ๐—ป๐—ด | ๐—•๐—ฒ๐—ฐ๐—ผ๐—บ๐—ฒ ๐—ฎ ๐—™๐˜‚๐—น๐—น๐˜€๐˜๐—ฎ๐—ฐโ€ฆ
  4. Oct 7, 2026๐— ๐—ฎ๐˜€๐˜๐—ฒ๐—ฟ ๐—ฃ๐—ผ๐˜„๐—ฒ๐—ฟ ๐—•๐—œ ๐—ณ๐—ผ๐—ฟ ๐—™๐—ฅ๐—˜๐—˜! ๐Ÿ”ฅ Learn Power BI through these FREE learninโ€ฆ
  5. Sep 29, 2026๐Ÿ“Š Excel Shortcuts โ€” Part 3 This part focuses on Formatting Shortcuts โ€” quickly format celโ€ฆ
  6. Sep 29, 2026๐—™๐—ฅ๐—˜๐—˜ ๐—ฅ๐—ฒ๐˜€๐—ผ๐˜‚๐—ฟ๐—ฐ๐—ฒ๐˜€ ๐—ง๐—ผ ๐—Ÿ๐—ฒ๐—ฎ๐—ฟ๐—ป ๐—”๐—œ ๐—ถ๐—ป ๐Ÿฎ๐Ÿฌ๐Ÿฎ๐Ÿฒ๐Ÿš€ โ€‹ Explore 6 free resourceโ€ฆ
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook โ†’Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 โ†’