Pull out the year

Exercise 5 of 11 Premium

Extract the year (the 4 digits in the middle) from the order code in D2.

Checking your plan…

customer-export.xlsx

ABCD
1Full nameEmailPhoneOrder code
2
3
4
5
6
7
8

About text in Excel

Real data is messy. These exercises use an exported customer list with extra spaces and random capitals. You'll clean names with TRIM and PROPER, pull pieces out of codes with LEFT and MID, and join text together.

Functions you can use here

  • TRIM(text)
  • PROPER(text)
  • LEFT(text, [num_chars])
  • MID(text, start_num, num_chars)
  • TEXTAFTER(text, delimiter, [instance_num])