

First, use SUBSTITUTE and REPT to substitute a single space with 100 spaces (or any other large number).Ģ.

To extract a substring containing specific text (for example, the symbol), use SUBSTITUTE, REPT, MID, FIND, TRIM and MAX in Excel.ġ.

Replace the 2 (third argument) with a formula that returns the length of the substring.Įxplanation: subtract the position of the opening parenthesis and the value 1 from the position of the closing parenthesis to find the correct length of the substring. This MID function always extracts 2 characters.Ģ. The formula shown above reduces to MID(A1,6+1,2). Add 1 to find the start position of the substring. To extract a substring between parentheses (or braces, brackets, slashes, etc.), use MID and FIND in Excel.Įxplanation: the FIND function finds the position of the opening parenthesis.
