Search code examples
excelexcel-formulaexcel-2007

Remove text and parenthesis in Excel?


I have a filtered column in Excel with over 1000 different email addresses and they vary in length with the usernames first and last name. For example the cell field would be something like:
Last Name, First Name (firstname.lastname@example.com)

I would like to remove the users last name, first name and parethesis except the email address itself so it should be firstname.lastname@example.com

I understand how to remove a certain length of characters such as =LEFT(A2, LEN(A2)-2) but not how to remove the parenthesis as well.

What's the function I would use in the cell?

Thanks!


Solution

  • Try this formula

    =SUBSTITUTE(MID(A1,FIND("(",A1)+1,99),")","")
    

    It finds the position of the opening parens, then grabs everything to its right and replaces the closing parens with an empty string.