Excel: How to Use Functions to Isolate Everything After a Dash

This page is an advertiser-supported excerpt of the book, Power Excel 2010-2013 from MrExcel - 567 Excel Mysteries Solved. If you like this topic, please consider buying the entire e-book.


Problem: I need to isolate everything after the dash from Fig 232 above.

Strategy: You can use the MID function to extract a portion of text from the middle of the text. The MID function requires three arguments: =MID(Cell with Text, Character Number to Start, Number of Characters). You can use the FIND function to locate the dash in the item number and start at one character to the right. Rather than use the LEN function to figure out the length, ask for a really large number for the number of characters. MID will only return characters to the end of the cell.

The FIND function requires two arguments. The first argument is the text that you are trying to locate. In this case, you are trying to locate a dash, so you should include the dash in quotation marks. The second argument is the location of the cell that contains the text to search. Here's how the process works:

  1. Enter =FIND("œ-",A2) in cell F2 and copy it down as in the previous topic.
  2. To isolate the part number, you need to start one character to the right of the dash, so start your formula with =MID(A2,F2+1,
  3. Next you need the number of characters. While you could use LEN(A2)-F2, it is not necessary. Use a large number such as 20 for the number of characters. This should be large enough to handle the largest possible part number. Close the formula with a ).
  4. Copy the formula =MID(A2,F2+1,20) down to all rows.

  1. MID with Find

    To combine the two formulas into a single formula, use =MID(A2,FIND("œ-",A2)+1,20).