MID Exercise: Extract the Year from an Invoice Number

Reading time: 3 minutes

When the information is in the middle of a text, LEFT and RIGHT are not enough. MID takes a starting position and a number of characters. And remember: what MID returns is a text, so you must convert it to use it in a calculation.

The following exercise shows you how to extract text at a fixed position with MID.

What you will practice in this exercise

You work on invoice numbers like INV-2024-001. You answer 6 questions, one formula per question:

  • Extract the year: position 5, 4 characters (MID)
  • Extract the number: the last 3 characters (RIGHT)
  • Extract the prefix: the first 3 letters (LEFT)
  • Rebuild: year + number (&)
  • Convert the year to a number (VALUE)
  • Extract the year of another invoice (MID)

Practice with exercises

MID — Fixed position
🔒 Members only

MID — Fixed position
Extract exactly the right chunk of text (a year, a number...) with MID.

Subscribe →

Related articles

Excel exercises: practice online with instant correction

All the exercises in this series are based on real cases found on Excel forums. Each one answers a question that Excel users really ask.

Leave a Reply

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

MID Exercise: Extract the Year from an Invoice Number

Reading time: 3 minutes

When the information is in the middle of a text, LEFT and RIGHT are not enough. MID takes a starting position and a number of characters. And remember: what MID returns is a text, so you must convert it to use it in a calculation.

The following exercise shows you how to extract text at a fixed position with MID.

What you will practice in this exercise

You work on invoice numbers like INV-2024-001. You answer 6 questions, one formula per question:

  • Extract the year: position 5, 4 characters (MID)
  • Extract the number: the last 3 characters (RIGHT)
  • Extract the prefix: the first 3 letters (LEFT)
  • Rebuild: year + number (&)
  • Convert the year to a number (VALUE)
  • Extract the year of another invoice (MID)

Practice with exercises

MID — Fixed position
🔒 Members only

MID — Fixed position
Extract exactly the right chunk of text (a year, a number...) with MID.

Subscribe →

Related articles

Excel exercises: practice online with instant correction

All the exercises in this series are based on real cases found on Excel forums. Each one answers a question that Excel users really ask.

Leave a Reply

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