Mastering Excel's MID Function: Extracting Substrings from the Middle

In this session, we delve into the MID string manipulation function in Excel, explaining its purpose and demonstrating its usage. Unlike the LEFT and RIGHT functions, which extract text from the ends of a string, the MID function allows you to extract a specified number of characters from the middle of a string. The video showcases an example of extracting a first name from a full name with a salutation, providing step-by-step instructions and identifying potential issues and solutions.

What will you learn

  • How to differentiate between MID, LEFT, and RIGHT functions.
  • The syntax and arguments required for the MID function.
  • Practical application of the MID function in extracting substrings from the middle.
  • How to handle common issues like unexpected extractions due to spaces.
  • Customizing extractions based on varying string lengths.

Takeaway notes

  • The MID function syntax: MID(text, start_num, num_chars).
  • The text argument specifies the string to manipulate.
  • The start_num argument indicates the position in the string from where to begin extraction.
  • The num_chars argument defines the number of characters to extract starting from start_num.
  • Unlike LEFT and RIGHT functions, MID gives you more flexibility in defining your extraction starting point and length.
  • Be cautious of spaces and varying string lengths when working with different names or data sets.

Practice questions

  1. What is the purpose of the MID function in Excel?
  2. How does the MID function differ from the LEFT and RIGHT functions?
  3. Write a formula using the MID function to extract the word "Data" from the string "Excel Data Science".
  4. Given the string "Mr. John Smith", use the MID function to extract the first name "John".
  5. If the text is "Ms. Jane Doe" and you want to extract the salutation using the MID function, what would be the formula?
  6. How would you modify the MID function if there were an extra space in the name extracted?
  7. What are the arguments required for the MID function?
  8. If Text is "Hello World" and Start_num is 7 with Num_chars as 5, what would be the result of the MID function?
  9. Write a formula using the MID function to extract the last name from the full name "Dr. Emily Brown".
  10. Explain how you can handle varying string lengths when extracting substrings using the MID function.
  11. If a cell contains the text "Professor Alan Turing", how would you extract "Alan" using the MID function?
  12. What would the formula MID("Good Morning", 6, 7) return?
  13. Provide a formula to extract the substring "Infinity" from the text "Bode Infinity Learning".
  14. Demonstrate how to use the MID function to extract the domain from an email address "user@example.com".
  15. How would you correct a MID function formula if it returns unwanted spaces due to varying string lengths?

Mark Lesson Complete (Mastering Excel's MID Function: Extracting Substrings from the Middle)