which, on row 5, returns “Perfect”. In the example on this page, we are using the MID function to extract text based on a start and end position. The MID function accepts three arguments: a text string, a starting position, and the number of characters to extract. The text comes from column B, and the starting position comes from column C. The number of characters to extract is calculated by subtracting the start from end, and adding 1. In cell E6:

### Functions to extract substrings

Excel provides three primary functions for extracting substrings: Click on function names above for details and linked examples.

### Finding start and end positions with a formula

In the example shown, start and end positions are based on hardcoded values. However, it is possible to calculate positions with the FIND function and SEARCH function. See links below for examples.

### Dave Bruns

Hi - I’m Dave Bruns, and I run Exceljet with my wife, Lisa. Our goal is to help you work faster in Excel. We create short videos, and clear examples of formulas, functions, pivot tables, conditional formatting, and charts.