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

04/01/2024

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)
NameOmissionSpecify
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)
NameOmissionSpecify
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)
NameOmissionSpecify
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.

Example Results

Each is extracted in red.

Spill

If you specify the argument the cell range, it will be Spill.

In many cases, "Text" will be set to Spill.

---

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.