ShareYourGroupShareYourGroupExcel Formulas

Text functions

LEFT and RIGHT functions in Excel

LEFT returns characters from the start of a text and RIGHT returns characters from the end.

Codes, phone numbers, email addresses and names all carry several pieces of information in one cell. LEFT and RIGHT cut a piece from one end. They are the simplest of the text-splitting functions and are usually combined with FIND and LEN to decide where to cut.

Syntax

=LEFT(text, [num_chars])
=RIGHT(text, [num_chars])
ArgumentWhat it is
textThe text, or a cell that holds it.
num_charsHow many characters to take. 1 if left out.

Examples

Each result below is what Excel itself showed for the formula on the sample sheet.

Sample sheet: Text as people really type it: stray spaces, mixed capitals, codes with dashes.
ABCD
1Full nameEmailCodeAmount as text
2  asha   verma asha.verma@example.comPB-10-12341,250
3RAVI KUMARravi@example.orgDL-08-0042300
4meena gillmeena.gill@example.comMH-12-9876 45.50 
5Kabir Khankabir@example.netRJ-14-000712 kg

How they work

LEFT counts characters from the first one. RIGHT counts back from the last one. Spaces and punctuation count as characters. If you leave the number out, you get a single character, which is handy for initials: =LEFT(A2).

Fixed positions and moving positions

When every value has the same layout, as in a code like PB-10-1234, the numbers can be typed in: the first two, the last four.

When the layout varies, as with names and email addresses, let another function find the cutting point.

These two patterns, shown in the third and fourth examples, split a cell at a space, a comma, a dash or an @ sign.

In Microsoft 365 there are easier functions for this, TEXTBEFORE and TEXTAFTER. Excel 2021 and earlier do not have them, so the patterns above remain worth knowing.

The result is always text

Even when the characters are digits, LEFT and RIGHT return text. It sits at the left of the cell, SUM ignores it, and a lookup against real numbers fails. To get a number, wrap the formula in VALUE, or add zero, or multiply by one. The sixth example does arithmetic on the result, which converts it and, in passing, drops the leading zeros.

If the zeros matter, as in a PIN code or an account number, keep the result as text.

Dates and formatted numbers

LEFT and RIGHT work on what is stored, not on what the cell shows. A date is stored as a number such as 46027, so =LEFT(A2,2) on a date cell returns 46, not the day. Use DAY, MONTH and YEAR for dates, or convert with TEXT first.

Other ways to split

Common mistakes

In Google Sheets

LEFT and RIGHT are the same in Google Sheets.

Related functions

Every result on this page was calculated in Microsoft Excel (version 16.0, build 20326) on 12 November 2026, not typed by hand.

This is an independent help site. It is not connected with or approved by Microsoft. Excel and Microsoft 365 are trademarks of Microsoft Corporation, named here only to say which program a formula is for. The people and figures in the sample sheets are made up.