LEFT, RIGHT and MID in Excel: examples and practice

LEFT takes characters from the start of a text, RIGHT from the end and MID from a position you choose. For example, =LEFT(A2,3) takes NOR from the code NOR-0830-A.

Syntax

=LEFT(text, [num_chars])
=RIGHT(text, [num_chars])
=MID(text, start_num, num_chars)
text
The text, or a cell with the text.
num_chars
The number of characters to take. In LEFT and RIGHT, the default is 1.
start_num (MID)
The position of the first character. The first character of the text is 1.

Examples

Example data

A
1Code
2NOR-0830-A
3SOU-0915-B
4EAS-1045-C
5NOR-1300-A
FormulaResultWhat it does
=LEFT(A2,3)NORTakes the first 3 characters: the branch.
=RIGHT(A2,1)ATakes the last character: the chair.
=MID(A2,5,4)0830Starts at character 5 and takes 4 characters: the time. The result is text, not a number.

Try it

In cell C3, take the branch from the code in A3. The branch is the first 3 characters.

Show the solution

=LEFT(A3,3) → SOU

Common mistakes

Hyphens and spaces count

In NOR-0830-A, the hyphen is character 4. The time starts at character 5, not 4. Count every character.

The result is text

MID gives "0830" as text. SUM ignores it. To get a number, use =VALUE(MID(A2,5,4)).

Dana Novak, manages the office at Copperleaf Dental

Practice this in a story

A short lesson from a real job. We show you each step, then you do it yourself.

Read the appointment code · Module 8 · Text · 5 min

Every Monday, Dana gets a file called appointments_FINAL_final_v7.xlsx. Each appointment has one code, for example NOR-0830-A. That means: North branch, 8:30, chair A. Dana needs the parts in their own columns.

Practice this in a story

Related functions