#1 Data Analytics Program in India
₹2,499₹1,499Enroll Now
Module 1
10 min

Text Functions

Learn how to work with text in Excel using simple functions

Text Functions in Excel

Sometimes you need to work with text, not just numbers. Excel has simple functions to help you clean, combine, and extract text.

Text Functions Overview

Why Do You Need Text Functions?

ProblemSolutionFunction
You have 'John Smith' but need just 'John'Extract first nameLEFT
You have 'hello' but need 'HELLO'Change to uppercaseUPPER
You have ' extra spaces 'Remove extra spacesTRIM
Combine First + Last nameJoin text togetherCONCATENATE
4 rows

1. CONCATENATE - Join Text Together

CONCATENATE means "join together". Think of it like gluing pieces of text.

CONCATENATE Example

The Problem: You have First Name in A1 and Last Name in B1. You want Full Name in C1.

ABC
1JohnSmith=CONCATENATE(A1, ' ', B1)
ResultJohnSmithJohn Smith
2 rows

Formula: =CONCATENATE(A1, " ", B1)

The " " adds a space between first and last name.

Easier Way: Use & Symbol

Instead of typing CONCATENATE, just use &:

=A1 & " " & B1 → Same result: "John Smith"

MethodFormulaResult
CONCATENATE=CONCATENATE(A1, ' ', B1)John Smith
& Symbol=A1 & ' ' & B1John Smith
CONCAT (newer)=CONCAT(A1, ' ', B1)John Smith
3 rows

Practice: Join First and Last Name

Easy

Join the first name in A1 with the last name in B1. Add a space between them using &.

A
B
C
D
E
F
1
2
3
4
5
6

2. LEFT - Get Characters from Left Side

LEFT extracts a specific number of characters from the beginning (left side) of text.

Formula: =LEFT(text, number_of_characters)

LEFT Function

How LEFT Works

Think of the word "APPLE":

Position12345
CharacterAPPLE
1 row

=LEFT("APPLE", 3) → Takes positions 1, 2, 3 → "APP"

More Examples

Text in A1FormulaResultExplanation
APPLE=LEFT(A1, 3)APPFirst 3 characters
HELLO=LEFT(A1, 2)HEFirst 2 characters
12345=LEFT(A1, 1)1First character only
John Smith=LEFT(A1, 4)JohnFirst 4 characters
4 rows

Practice: Get First 3 Characters

Easy

Get the first 3 characters from the text in A1 using LEFT function.

A
B
C
D
E
F
1
2
3
4
5
6

3. RIGHT - Get Characters from Right Side

RIGHT extracts characters from the end (right side) of text.

Formula: =RIGHT(text, number_of_characters)

How RIGHT Works

Think of the word "APPLE":

Position12345
CharacterAPPLE
1 row

=RIGHT("APPLE", 2) → Takes last 2 positions → "LE"

More Examples

Text in A1FormulaResultExplanation
APPLE=RIGHT(A1, 2)LELast 2 characters
HELLO=RIGHT(A1, 3)LLOLast 3 characters
12345=RIGHT(A1, 2)45Last 2 characters
john@email.com=RIGHT(A1, 3)comLast 3 characters
4 rows

Practice: Get Last 2 Characters

Easy

Get the last 2 characters from the text in A1 using RIGHT function.

A
B
C
D
E
F
1
2
3
4
5
6

4. MID - Get Characters from Middle

MID extracts characters from anywhere in the text - beginning, middle, or end.

Formula: =MID(text, start_position, number_of_characters)

MID Function

How MID Works

PartWhat It Means
textThe cell or text to extract from
start_positionWhere to start (1 = first character)
number_of_charactersHow many characters to extract
3 rows

Visual Example

Text: "HELLO WORLD"

Position1234567891011
CharacterHELLO WORLD
1 row

=MID("HELLO WORLD", 7, 5) → Starts at 7, takes 5 → "WORLD"

More Examples

Text in A1FormulaResultExplanation
APPLE=MID(A1, 2, 3)PPLStart at 2, take 3
HELLO=MID(A1, 2, 2)ELStart at 2, take 2
123-456-7890=MID(A1, 5, 3)456Extract middle part
ABC123XYZ=MID(A1, 4, 3)123Get numbers from middle
4 rows

5. LEN - Count Characters

LEN tells you how many characters are in text (including spaces!).

Formula: =LEN(text)

Text in A1FormulaResultNote
APPLE=LEN(A1)55 letters
Hello World=LEN(A1)1110 letters + 1 space = 11
123=LEN(A1)33 digits
A B C=LEN(A1)53 letters + 2 spaces = 5
4 rows

Important: Spaces count as characters!

Practical Use: Validate Data Length

Check if phone number has 10 digits: =IF(LEN(A1)=10, "Valid", "Invalid")


6. UPPER, LOWER, PROPER - Change Text Case

These functions change how text looks - uppercase, lowercase, or title case.

Case Functions

FunctionWhat It DoesFormula
UPPERMakes ALL CAPS=UPPER(A1)
LOWERMakes all lowercase=LOWER(A1)
PROPERMakes Title Case (First Letter Capital)=PROPER(A1)
3 rows

Comparison Table

Original TextUPPERLOWERPROPER
hello worldHELLO WORLDhello worldHello World
JOHN SMITHJOHN SMITHjohn smithJohn Smith
mIxEd CaSeMIXED CASEmixed caseMixed Case
NEW YORK CITYNEW YORK CITYnew york cityNew York City
4 rows

Practice: Convert to Uppercase

Easy

Convert the text in A1 to all uppercase letters.

A
B
C
D
E
F
1
2
3
4
5
6

7. TRIM - Remove Extra Spaces

TRIM removes:

  • Spaces at the beginning
  • Spaces at the end
  • Extra spaces between words (keeps only 1 space)

Formula: =TRIM(text)

TRIM Function

Before and After TRIM

Before (Raw Data)After TRIMSpaces Removed
Hello HelloLeading & trailing
Hello WorldHello WorldExtra spaces in middle
John Smith John SmithAll extra spaces
3 rows

Why is TRIM important?

When you copy data from websites or other sources, it often has hidden spaces. These spaces can cause:

  • VLOOKUP failures
  • Wrong calculations
  • Duplicate-looking entries

Real World Example: Clean Messy Customer Data

You receive this messy data from a form:

A (Raw Input)B (Cleaned Output)Formula Used
john SMITH John Smith=PROPER(TRIM(A1))
MARY jonesMary Jones=PROPER(TRIM(A2))
bob WILSON Bob Wilson=PROPER(TRIM(A3))
3 rows

The Magic Formula: =PROPER(TRIM(A1))

  1. TRIM removes extra spaces
  2. PROPER capitalizes first letters

Quick Reference Card

FunctionPurposeSyntaxExample Result
CONCATENATEJoin text=CONCATENATE(A1,B1)JohnSmith
LEFTGet first X chars=LEFT(A1,3)Joh
RIGHTGet last X chars=RIGHT(A1,3)ith
MIDGet middle chars=MID(A1,2,3)ohn
LENCount characters=LEN(A1)9
UPPERALL CAPS=UPPER(A1)JOHNSMITH
LOWERall lowercase=LOWER(A1)johnsmith
PROPERTitle Case=PROPER(A1)Johnsmith
TRIMRemove spaces=TRIM(A1)John Smith
9 rows

Common Mistakes to Avoid

MistakeWrongCorrect
Forgetting quotes for space=A1 & & B1=A1 & ' ' & B1
MID position starts at 0=MID(A1,0,3)=MID(A1,1,3)
Forgetting spaces in LENExpecting 10 for Hello WorldIts 11 (space counts!)
Using wrong functionLEFT for last charsUse RIGHT for last chars
4 rows

Summary

Text functions help you:

  • Combine text (CONCATENATE, &)
  • Extract parts (LEFT, RIGHT, MID)
  • Count characters (LEN)
  • Change case (UPPER, LOWER, PROPER)
  • Clean data (TRIM)

Pro Tip: Combine functions for powerful results!

  • Clean names: =PROPER(TRIM(A1))
  • Get domain from email: =RIGHT(A1, LEN(A1)-FIND("@",A1))

Practice these functions - they are essential for data cleaning!