How this MID formula works
The first hyphen is character 4, so extraction begins at 5. The second hyphen is character 9, making the slice four characters long; MID returns AX42.
The top row above is the whole formula. Open any argument that holds a calculation of
its own to see the values it used. Excel works out those inner parts first, because the
function around them needs their results. Edit a cell in the grid to see every value
update.
Try your own formula and data
The sample spreadsheet is fully editable. Change the formula or any cell it references.
The intermediate values recalculate in your browser.
Common mistakes with MID
If this formula is not doing what you expect, one of these is usually why.
Why does this MID FIND formula return #VALUE!?
FIND could not locate one of the expected hyphens. Check that the source text contains both delimiters and that the formula uses the correct character.
Why is the first or last character missing?
The +1 and -1 adjustments define the slice inside the delimiters. Removing or duplicating one shifts the starting point or length.
Is FIND case-sensitive?
Yes. FIND distinguishes uppercase and lowercase text. Use SEARCH when the text match should ignore case.
Is there a simpler formula in modern Excel?
TEXTBEFORE, TEXTAFTER, and TEXTSPLIT can be easier when available. MID and FIND remain useful in older Excel versions and when you need exact positions.