Hiring Partners
Segilola Resources Operating LimitedTaviatech TechnologiesFCMBMTN NigeriaAdvans La Fayette Microfinance BankAboki AfricaFirst Bank of NigeriaOPay
โ† Data Analysis with Excel Functions ยท Lesson 6 of 9

Module Five

๐Ÿ“– Every lesson in this course is free to read right here, no account needed. Create a free account to track your progress, take the exam, and earn your certificate.
6

Module 5: Text Functions for Data Analysis

Module Introduction

Imagine you are working with a school database containing the names, addresses, email addresses, and phone numbers of students. Some names may be written in capital letters, others in small letters, and some may have unwanted spaces.

Before analysing this information, you may need to organise and clean it. Microsoft Excel provides text functions that help you change, combine, extract, and clean text without typing everything again.

In this module, you will learn how to use important Excel text functions to prepare information for data analysis.

Learning Objectives

By the end of this module, you should be able to:

  • Explain what text functions are in Excel.
  • Change text from uppercase to lowercase and proper case.
  • Combine text from different cells.
  • Extract specific characters from a cell.
  • Remove unwanted spaces from text.
  • Count the number of characters in a cell.
  • Clean and organise text data for analysis.

1. Understanding Text Functions

Text functions are Excel formulas that help you work with words, letters, numbers stored as text, and other characters.

For example, imagine a spreadsheet containing these names:

  • JOHN ADE
  • mary james
  • peter david

You can use Excel text functions to make these names look neat and consistent.

2. Using the UPPER Function

The UPPER function changes all letters in a text value to capital letters.

UPPER Function Syntax

=UPPER(text)

Example

Assume a student's name is stored in cell A2 as john ade.

Enter this formula in B2:

=UPPER(A2)

Result: JOHN ADE

This function is useful when preparing names, product labels, and other records that should appear in capital letters.

3. Using the LOWER Function

The LOWER function changes all letters in a text value to small letters.

LOWER Function Syntax

=LOWER(text)

Example

Assume cell A2 contains the text JOHN ADE.

Enter:

=LOWER(A2)

Result: john ade

LOWER can help make email addresses and other text records consistent.

4. Using the PROPER Function

The PROPER function changes the first letter of each word to a capital letter and changes the remaining letters to small letters.

PROPER Function Syntax

=PROPER(text)

Example

Suppose cell A2 contains:

MARY JAMES

Enter:

=PROPER(A2)

Result: Mary James

This function is useful when organising students' names, employee records, customer lists, and contact databases.

5. Combining Text with CONCAT

Sometimes information is stored in separate cells, but you need to bring it together.

For example, a student's first name may be in cell A2 while the surname is in cell B2. You can use CONCAT to join them.

CONCAT Function Syntax

=CONCAT(text1, text2, ...)

Example

First NameSurname
AdeJohnson
MaryJames
DavidOkoro

To combine the first name and surname with a space between them, enter:

=CONCAT(A2," ",B2)

Result: Ade Johnson

The quotation marks containing a space tell Excel to leave a gap between the two names.

Another Way to Join Text

You can also use the ampersand (&) symbol to combine text.

=A2&" "&B2

This produces the same result: Ade Johnson.

6. Using LEFT, RIGHT, and MID Functions

These functions help you extract specific characters from a text value. Extracting means taking only the part of the text you need.

The LEFT Function

LEFT extracts characters from the beginning or left side of a text value.

Syntax:

=LEFT(text, num_chars)

Assume cell A2 contains the student ID CRM2026. To extract the first three characters, enter:

=LEFT(A2,3)

Result: CRM

The RIGHT Function

RIGHT extracts characters from the end or right side of a text value.

Syntax:

=RIGHT(text, num_chars)

To extract the last four characters from CRM2026, enter:

=RIGHT(A2,4)

Result: 2026

The MID Function

MID extracts characters from the middle of a text value. You tell Excel where to start and how many characters to extract.

Syntax:

=MID(text, start_num, num_chars)

Suppose cell A2 contains CRM2026. To extract the four characters starting from the fourth position, enter:

=MID(A2,4,4)

Result: 2026

7. Using the TRIM Function

Sometimes people accidentally enter extra spaces before, between, or after words. These spaces can make data difficult to organise.

The TRIM function removes unnecessary spaces from text. It keeps a single space between words.

TRIM Function Syntax

=TRIM(text)

Example

Assume cell A2 contains:

  Mary     James  

Enter:

=TRIM(A2)

Result: Mary James

TRIM is especially useful when cleaning customer names, school records, and imported spreadsheet data.

8. Using the LEN Function

LEN counts the number of characters in a text value. Characters include letters, numbers, symbols, and spaces.

LEN Function Syntax

=LEN(text)

Example

Assume cell A2 contains:

CRMNuggets

Enter:

=LEN(A2)

Result: 9

Excel counts each letter in the word. If the text contains spaces, those spaces are counted too.

9. Using the SUBSTITUTE Function

SUBSTITUTE replaces specific text with another text inside a cell.

For example, a company may want to replace an old product name with a new one in its records.

SUBSTITUTE Function Syntax

=SUBSTITUTE(text, old_text, new_text, [instance_num])
  • Text: The original text.
  • Old_text: The text you want to replace.
  • New_text: The replacement text.
  • Instance_num: Optional. Specifies which occurrence to replace.

Example

Suppose cell A2 contains:

Old Product - Rice

Enter:

=SUBSTITUTE(A2,"Old Product","New Product")

Result: New Product - Rice

10. Practical Example: Cleaning Student Records

Imagine a school in Ibadan has received a spreadsheet containing student names in different formats. Your task is to clean and organise the names.

Original NameClean Name
JOHN ADEJohn Ade
mary jamesMary James
PETER DAVID Peter David
GRACE OKOROGrace Okoro

Assume the original names are stored in column A. Enter this formula in B2:

=PROPER(TRIM(A2))

This formula combines two functions. TRIM removes unnecessary spaces, while PROPER makes the first letter of each word capital.

Drag the formula down to clean the remaining names.

11. Summary of Important Text Functions

FunctionPurposeExample
UPPERChanges text to capital letters.=UPPER(A2)
LOWERChanges text to small letters.=LOWER(A2)
PROPERCapitalises the first letter of each word.=PROPER(A2)
CONCATJoins text together.=CONCAT(A2," ",B2)
LEFTExtracts characters from the beginning.=LEFT(A2,3)
RIGHTExtracts characters from the end.=RIGHT(A2,4)
MIDExtracts characters from the middle.=MID(A2,4,4)
TRIMRemoves unnecessary spaces.=TRIM(A2)
LENCounts the number of characters.=LEN(A2)
SUBSTITUTEReplaces specific text.=SUBSTITUTE(A2,"Old","New")

12. Common Mistakes to Avoid

  • Forgetting to include the correct cell reference.
  • Using the wrong number of characters in LEFT, RIGHT, or MID.
  • Forgetting quotation marks around text values in formulas.
  • Expecting TRIM to remove every unusual hidden character. Some imported data may need additional cleaning.
  • Confusing UPPER, LOWER, and PROPER.
  • Forgetting that LEN counts spaces as characters.

13. Practical Exercise

A computer training centre in Lagos has collected the names and identification numbers of five students. Your task is to clean and analyse the information using Excel text functions.

Student NameStudent ID
JOHN ADE CRM202601
MARY JAMESCRM202602
peter davidCRM202603
GRACE OKOROCRM202604
DAVID EZECRM202605

Your Tasks

  1. Use PROPER and TRIM together to clean all student names.
  2. Use UPPER to convert all student names to capital letters.
  3. Use LOWER to convert all student names to small letters.
  4. Use LEFT to extract the first three characters from each student ID.
  5. Use RIGHT to extract the last two characters from each student ID.
  6. Use MID to extract the four-digit year from each student ID.
  7. Use LEN to count the characters in each student ID.

Module Summary

In this module, you learned how to use Excel text functions to organise and clean information.

  • UPPER: Changes text to capital letters.
  • LOWER: Changes text to small letters.
  • PROPER: Capitalises the first letter of each word.
  • CONCAT: Joins text from different cells.
  • LEFT, RIGHT, and MID: Extract parts of text.
  • TRIM: Removes unnecessary spaces.
  • LEN: Counts characters.
  • SUBSTITUTE: Replaces specific text.

These functions are useful when preparing student records, customer databases, employee information, product lists, and other datasets for analysis.

What Is Next?

In Module 6, you will learn about Date and Time Functions in Excel. You will discover how to work with dates, calculate the number of days between two dates, extract years and months, and analyse time-based information.

๐Ÿ† Get Certified

๐Ÿ”’

Earn this certificate

Every lesson is already free to read. Sign up, finish the lessons, pass the exam (โ‚ฆ2,000 or 20,000 coins), and get a verified certificate with your name on it.

๐ŸŽ“ Sign Up to Get Certified
๐Ÿ› ๏ธ Practice Tools
Hands-on simulators & labs - subscription required.
โ†’
๐ŸŽฏ Internship Tasks
Real-world tasks to build your portfolio - unlock them with a subscription.
โ†’