Excel Tutorial
Excel tutorials, quizzes & AI guides — all levels
RSS
  • Online Excel Exercises
  • Training
  • Excel Tests
  • Sitemap
  • Premium Quizzes
  • Shop
  • My account

Functions LEFT – RIGHT – MID

Text functions
Reading time: 2 minutes
Views: 28,657

Excel functions LEFT, RIGHT, and MID allow you to pull specific parts of text, making them powerful tools for organizing and analyzing data. They are among the Top 10 Excel Functions You Must Know.

These functions are especially useful when working with structured codes, like phone numbers, zip codes, barcodes….

Study Case: Let’s split a VIN

A VIN (Vehicle Identification Number) is a unique 17-character code that identifies every vehicle. It’s divided into three main sections:

  • WMI (World Manufacturer Identifier): The first three characters reveal the manufacturer and country.
  • VDS (Vehicle Descriptor Section): Characters 4 to 9 describe the vehicle’s model, engine type, and body style.
  • VIS (Vehicle Identifier Section): The last eight characters include the model year, plant, and unique serial number.

The following document lists car manufacturers, the vehicle model, and the VIN. Use the LEFT, RIGHT, and MID functions to extract each part of the VIN.

VIN number examples

LEFT Function to Extract the WMI Code

The WMI (World Manufacturer Identifier) represents the first 3 characters of the VIN and identifies the vehicle’s country and manufacturer. To extract these initial characters in Excel, use the LEFT function. Here’s how:

  • Formula: =LEFT(C2, 3)
  • Explanation: This formula pulls the first 3 characters, where 3 specifies the number of characters to extract.
LEFT function to extract the x left characters of a string

RIGHT Function to Extract the VIS Code

The VIS (Vehicle Identifier Section) is the last 8 characters of the VIN. To capture this part, use the RIGHT function:

  • Formula: =RIGHT(C2, 8)
  • Explanation: This formula retrieves the final 8 characters, where 8 defines the length of the substring.
RIGHT function to extract the x right characters of a string

MID Function to Extract the VDS Code

The VDS (Vehicle Descriptor Section) occupies 6 characters, starting from the 4th position in a VIN. To extract this middle section, use the MID function:

  • Formula: =MID(C2, 4, 6)
  • Explanation: Here, 4 is the starting position, and 6 is the length of the substring.
MID function to extract the characters inside a string
  • This article will show you a trick to split a VIN with a single MID function 😮👍

Online Excercise

LEFT and RIGHT Exercise - Break down a product reference (type, family, number)

Pull apart a structured product reference into its category, number and full code using LEFT, RIGHT, MID, LEN and & — 6 guided steps.

=LEFT( cell , num_chars )

1 / 6

Extract the type (first 3 letters of A2)

Text — Q1 · 278

=LEFT(A2,3)

=RIGHT( cell , num_chars )

2 / 6

Extract the sequential number (last 3 characters of A2)

Text — Q2 · 279

=RIGHT(A2,3)

=LEN( cell )

3 / 6

Count the number of characters in A2

Text — Q3 · 280

=LEN(A2)

=MID( cell , start , num_chars )

4 / 6

Extract the family code (3 letters in the middle, position 5)

Text — Q4 · 281

=MID(A2,5,3)

=LEFT(…)&"-"&RIGHT(…)

5 / 6

Rebuild a short code: type + number

Text — Q5 · 282

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

=LEFT( cell , 1 )

6 / 6

Extract the first letter of the description B2

Text — Q6 · 283

=LEFT(B2,1)

Your score is

0%

Other TEXT functions in Excel

LEFT, RIGHT, and MID are crucial in extracting part of a string. Additionally, you can employ other functions to extract even more intricate substrings.

  • Tutorial – Automatically extracting or merging cells
  • The LEN function in Excel
  • The SEARCH function in Excel: return character’s position
  • The TRIM function of Excel
  • Mastering TEXTBEFORE and TEXTAFTER in Excel
  • Split your text on a delimiter – TEXTSPLIT Function

Frédéric LE GUEN

beginner, MID, most useful functions, Top 10

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Most Viewed Posts

  • Displaying Negative Numbers in Parentheses in Excel (310,065)
  • Top 10 Excel Functions You Must Know (232,001)
  • How to make automatic calendar in Excel (212,775)
  • Dash for a zero in Excel automatically (190,813)
  • Converting a Date from YYYYMMDD to DD/MM/YYYY in Excel (171,034)
image excel exercises
Excel Exercises
image excel quizzes
Excel Quizzes

Functions LEFT – RIGHT – MID

Reading time: 2 minutes
Views: 28,657

Excel functions LEFT, RIGHT, and MID allow you to pull specific parts of text, making them powerful tools for organizing and analyzing data. They are among the Top 10 Excel Functions You Must Know.

These functions are especially useful when working with structured codes, like phone numbers, zip codes, barcodes….

Study Case: Let’s split a VIN

A VIN (Vehicle Identification Number) is a unique 17-character code that identifies every vehicle. It’s divided into three main sections:

  • WMI (World Manufacturer Identifier): The first three characters reveal the manufacturer and country.
  • VDS (Vehicle Descriptor Section): Characters 4 to 9 describe the vehicle’s model, engine type, and body style.
  • VIS (Vehicle Identifier Section): The last eight characters include the model year, plant, and unique serial number.

The following document lists car manufacturers, the vehicle model, and the VIN. Use the LEFT, RIGHT, and MID functions to extract each part of the VIN.

VIN number examples

LEFT Function to Extract the WMI Code

The WMI (World Manufacturer Identifier) represents the first 3 characters of the VIN and identifies the vehicle’s country and manufacturer. To extract these initial characters in Excel, use the LEFT function. Here’s how:

  • Formula: =LEFT(C2, 3)
  • Explanation: This formula pulls the first 3 characters, where 3 specifies the number of characters to extract.
LEFT function to extract the x left characters of a string

RIGHT Function to Extract the VIS Code

The VIS (Vehicle Identifier Section) is the last 8 characters of the VIN. To capture this part, use the RIGHT function:

  • Formula: =RIGHT(C2, 8)
  • Explanation: This formula retrieves the final 8 characters, where 8 defines the length of the substring.
RIGHT function to extract the x right characters of a string

MID Function to Extract the VDS Code

The VDS (Vehicle Descriptor Section) occupies 6 characters, starting from the 4th position in a VIN. To extract this middle section, use the MID function:

  • Formula: =MID(C2, 4, 6)
  • Explanation: Here, 4 is the starting position, and 6 is the length of the substring.
MID function to extract the characters inside a string
  • This article will show you a trick to split a VIN with a single MID function 😮👍

Online Excercise

LEFT and RIGHT Exercise - Break down a product reference (type, family, number)

Pull apart a structured product reference into its category, number and full code using LEFT, RIGHT, MID, LEN and & — 6 guided steps.

=LEFT( cell , num_chars )

1 / 6

Extract the type (first 3 letters of A2)

Text — Q1 · 278

=LEFT(A2,3)

=RIGHT( cell , num_chars )

2 / 6

Extract the sequential number (last 3 characters of A2)

Text — Q2 · 279

=RIGHT(A2,3)

=LEN( cell )

3 / 6

Count the number of characters in A2

Text — Q3 · 280

=LEN(A2)

=MID( cell , start , num_chars )

4 / 6

Extract the family code (3 letters in the middle, position 5)

Text — Q4 · 281

=MID(A2,5,3)

=LEFT(…)&"-"&RIGHT(…)

5 / 6

Rebuild a short code: type + number

Text — Q5 · 282

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

=LEFT( cell , 1 )

6 / 6

Extract the first letter of the description B2

Text — Q6 · 283

=LEFT(B2,1)

Your score is

0%

Other TEXT functions in Excel

LEFT, RIGHT, and MID are crucial in extracting part of a string. Additionally, you can employ other functions to extract even more intricate substrings.

  • Tutorial – Automatically extracting or merging cells
  • The LEN function in Excel
  • The SEARCH function in Excel: return character’s position
  • The TRIM function of Excel
  • Mastering TEXTBEFORE and TEXTAFTER in Excel
  • Split your text on a delimiter – TEXTSPLIT Function
Tags: beginnerMIDmost useful functionsTop 10

Frédéric LE GUEN

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Contact us
About me 
Privacy Policy

© 2022 – 2026 – excel-tutorial.com. All Rights Reserved.
Excel Tutorial is managed by majordome du net

Contact us
About me 
Privacy Policy

© 2022 – 2026 – excel-tutorial.com. All Rights Reserved.
Excel Tutorial is managed by majordome du net