LEFT, RIGHT & MID Combined in Excel: Complete Tutorial with Examples

Combine LEFT RIGHT MID to parse complex text, split names and addresses, extract multiple segments, and handle any text-parsing challenge.

Need to extract multiple pieces from complex text? Combining LEFT, RIGHT, and MID creates powerful text parsing solutions. Master these combinations to split names, parse addresses, clean data, and extract any text segment you need.

What Makes These Combinations Powerful

LEFT, RIGHT, and MID work together perfectly:

  • Complete text parsing – Extract any part of text from any position
  • Name splitting – Separate first, middle, and last names
  • Address parsing – Break down full addresses into components
  • Complex data cleaning – Handle multi-part codes and identifiers
  • Flexible extraction – Adapt to variable-length text fields
How They Work Together

LEFT gets the beginning. RIGHT gets the end. MID gets the middle.

Combine all three in a single formula to extract multiple segments simultaneously.


Example 1: Three-Part Product Code (Basic)

Extract category, year, and ID from product codes:

All Three Parts Combined:

Category: =LEFT(A2, 3)
Year: =MID(A2, 5, 4)
ID: =RIGHT(A2, 5)

Combined Display: =LEFT(A2, 3) & " / " & MID(A2, 5, 4) & " / " & RIGHT(A2, 5)

Result: ELC / 2025 / 12345

LEFT extracts the category, MID extracts the year, RIGHT extracts the ID number.


Example 2: Phone Number Reformatting (Intermediate)

Convert (555) 123-4567 to 555.123.4567 using all three functions:

Reformat Formula:

=MID(A2, 2, 3) & "." & MID(A2, 7, 3) & "." & RIGHT(A2, 4)

Result: 555.123.4567

MID extracts area code (position 2), MID extracts prefix (position 7), RIGHT extracts line number.


Example 3: Date Reconstruction (Intermediate)

Convert “2025-03-15” to “March 15, 2025” using all three:

Display Formula:

=TEXT(DATE(LEFT(A2,4), MID(A2,6,2), RIGHT(A2,2)), "MMMM DD, YYYY")

Simpler Display:

="Month: " & MID(A2,6,2) & " / Day: " & RIGHT(A2,2) & " / Year: " & LEFT(A2,4)

Result: Month: 03 / Day: 15 / Year: 2025

LEFT gets year, MID gets month, RIGHT gets day, all combined.


Example 4: Name Badge Format (Intermediate)

Create “SMITH, J.M.” format from “John Michael Smith”:

Badge Format Formula:

=UPPER(RIGHT(A2, LEN(A2)-SEARCH(" ", A2, SEARCH(" ", A2)+1))) & ", " & LEFT(A2, 1) & "." & MID(A2, SEARCH(" ", A2)+1, 1) & "."

Result: SMITH, J.M.

RIGHT extracts last name, LEFT gets first initial, MID gets middle initial.


Example 5: Account Number Masking (Advanced)

Show only first 3 and last 4 digits of account: ACC-XXXX-5678

Masked Display:

=LEFT(A2, 3) & "-XXXX-" & RIGHT(A2, 4)

Result: ACC-XXXX-5678

LEFT keeps prefix, RIGHT shows last digits, middle is masked.


Example 6: Email Component Extraction (Advanced)

Extract and display all email parts in one formula:

Full Breakdown Formula:

="User: " & LEFT(A2, SEARCH("@", A2)-1) & " | Domain: " & MID(A2, SEARCH("@", A2)+1, SEARCH(".", A2, SEARCH("@", A2))-SEARCH("@", A2)-1) & " | Type: " & RIGHT(A2, LEN(A2)-SEARCH(".", A2, SEARCH("@", A2)))

Result: User: john.smith | Domain: company | Type: com

LEFT extracts username, MID extracts domain name, RIGHT extracts extension.


Example 7: Complex Code Validation (Advanced)

Create validation string from 4-part code: CAT-TYPE-YEAR-ID

Validation Display:

="Valid: " & LEFT(A2,3) & " is " & MID(A2,5,4) & " type from " & MID(A2,10,4) & " #" & RIGHT(A2,5)

Result: Valid: ELC is PROD type from 2025 #12345

LEFT gets category, first MID gets type, second MID gets year, RIGHT gets ID.


Example 8: Address Label Creation (Expert)

Format address from “123 Main St, Boston, MA 02101”:

Label Format:

=LEFT(A2, SEARCH(",", A2)-1) & CHAR(10) & MID(A2, SEARCH(",", A2)+2, SEARCH(",", A2, SEARCH(",", A2)+1)-SEARCH(",", A2)-2) & ", " & MID(A2, SEARCH(",", A2, SEARCH(",", A2)+1)+2, 2) & " " & RIGHT(A2, 5)

Result (multi-line): 123 Main St Boston, MA 02101

LEFT gets street, first MID gets city, second MID gets state, RIGHT gets zip.


Example 9: Serial Number Parser (Expert)

Parse “ABC-2025-Q1-001” into readable format:

Formatted Output:

="Product " & LEFT(A2,3) & " from " & MID(A2,5,4) & " quarter " & MID(A2,10,2) & " unit #" & RIGHT(A2,3)

Result: Product ABC from 2025 quarter Q1 unit #001

LEFT, two MIDs, and RIGHT extract all four segments.


Example 10: File Path Display (Expert)

Show “Filename.ext from Drive:” format:

Display Formula:

=RIGHT(A2, LEN(A2)-SEARCH("~", SUBSTITUTE(A2, "\", "~", LEN(A2)-LEN(SUBSTITUTE(A2, "\", ""))))) & " from " & LEFT(A2, 2)

Then Extract Parts:

="File: " & LEFT([filename], SEARCH(".", [filename])-1) & " | Type: " & RIGHT([filename], LEN([filename])-SEARCH(".", [filename])) & " | Drive: " & LEFT(A2, 1)

Result: File: report | Type: pdf | Drive: C

RIGHT extracts filename, then LEFT gets name part, RIGHT gets extension, LEFT gets drive.


Master Pattern: Three-Segment Extraction

Template for any three-part text:

=LEFT(A2, [first_delimiter_position]-1) & " + " & 
 MID(A2, [first_delimiter_position]+1, [second_delimiter_position]-[first_delimiter_position]-1) & " + " & 
 RIGHT(A2, LEN(A2)-[second_delimiter_position])
Common Combination Patterns

Display all three parts:

="First: " & LEFT(A2, 5) & " | Middle: " & MID(A2, 7, 4) & " | Last: " & RIGHT(A2, 3)

Reorder parts:

=RIGHT(A2, 4) & "-" & MID(A2, 5, 4) & "-" & LEFT(A2, 3)

Create formatted output:

=LEFT(A2, 3) & " (" & MID(A2, 5, 4) & ") " & RIGHT(A2, 5)
When to Use All Three Together

Use LEFT + MID + RIGHT combined when:

  • Text has three or more distinct segments
  • Need to extract beginning, middle, and end simultaneously
  • Reformatting or restructuring multi-part data
  • Creating display strings from parsed components
  • Building validation or summary strings
Start Using Them Together

Pick a cell with three distinct parts separated by delimiters. Identify each segment’s position. Write LEFT for the first part, MID for the middle, RIGHT for the end. Combine them with concatenation (&) to create your output.

The power comes from using all three in one formula.


Questions about combining LEFT RIGHT MID? Need help with specific parsing scenarios? Let’s connect.