Mastering Excel String Functions

Oct 12, 2024

Excel String Functions Tutorial

Overview

  • Tutorial on how to use MID, LEFT, and RIGHT functions in Microsoft Excel.
  • These functions are used to extract specific text or numbers from a cell.

Use Cases

  • Extracting bits of information from text or numbers.
  • Example: Extracting area codes from phone numbers, zip codes from addresses, and months from dates.

LEFT Function

  • Purpose: Extracts a specified number of characters from the beginning (left side) of a text string.
  • Example: Extracting area codes from phone numbers.
    • Steps:
      1. Click on the cell to enter the formula (e.g., E2).
      2. Type =LEFT( followed by the text cell reference (e.g., D2).
      3. Specify the number of characters (e.g., 5 to include parenthesis).
      4. Enter the formula and use autofill to apply to other cells.
  • Use Case: Useful for extracting consistent starting characters.

RIGHT Function

  • Purpose: Extracts a specified number of characters from the end (right side) of a text string.
  • Example: Extracting zip codes from addresses.
    • Steps:
      1. Type =RIGHT( followed by text cell reference (e.g., C2).
      2. Specify the number of characters (e.g., 5 for zip codes).
      3. Enter the formula and use autofill to apply to other cells.
  • Use Case: Helpful for extracting consistent ending characters, sorting data by zip code.

MID Function

  • Purpose: Extracts characters from the middle of a text string, based on a starting position and length.
  • Example: Extracting months from a date string.
    • Steps:
      1. Type =MID( followed by the text cell reference (e.g., B2).
      2. Specify starting character position (e.g., 6) for the month.
      3. Specify the number of characters (e.g., 3 for "JUN").
      4. Enter the formula and use autofill to apply to other cells.
  • Use Case: Useful for extracting specific data located in middle of text.

Combining Functions

  • Example: Extract year using RIGHT function.
    • Steps:
      1. Use =RIGHT( with the starting cell reference (e.g., B2).
      2. Specify number of characters needed (e.g., 4 for year).
      3. Apply with autofill for other cells.

Conclusion

  • Excel string functions (LEFT, RIGHT, MID) are powerful tools for data extraction and manipulation.
  • Useful for organizing and analyzing data efficiently.

Call to Action

  • Encourage viewers to like, follow, subscribe, and support via Patreon.