LEFT, MID, and RIGHT functions. Extracts strings by specifying the number of characters.(Microsoft Excel)

05/05/2023

Japanese version.

The LEFT, MID, and RIGHT functions extract a portion of text by specifying a number of characters.

They are used infrequently by themselves, but are often used in combination with other functions.

How it works

LEFT function.

=LEFT(Text,Num_chars)
NameOmissionExplanation
TextRequired argument.
Target Text.
Num_charsRequired argument.
Number of characters to be extracted from the top to the right.
To the end of the text, if the number of characters in the text is exceeded.
Multibyte characters are also counted as 1.

MID function.

=MID(Text,Start_num,Num_chars)
NameOmissionExplanation
TextRequired argument.
Target Text.
Start_numRequired argument.
Starting position for cutout. Sequential numbering with the first position as 1.
Num_charsRequired argument.
Number of characters to be extracted from the Start_num to the right.
If the number of characters in the text is exceeded, to the end.
Multibyte characters are also counted as 1.

RIGHT function.

=RIGHT(Text,Num_chars)
NameOmissionExplanation
TextRequired argument.
Target Text.
Num_charsRequired argument.
Number of characters to be cut off from the end to the right.
If the number of characters exceeds the number of text characters, it remains text.
Multibyte characters are also counted as 1.

Demonstrate

Each is extracted in red.

---

Links

Microsoft Excel Functions Text

Examples of Use

Formulas to extract text from a cell every specified number of letters.

Formulas to sort text in cells.

Formula to split text into cells one character at a time.

How to reverse text.

How to extract only numbers from text.