简体   繁体   中英

How to remove all text after a specific character in Excel

This question relates to Excel.

I am trying to remove all text to the left of a specific character in a cell using a formula, but I keep getting an error.

I have a list of users in my website database, and I exported the email field like the following:

name@abc.com
joe@123.com
pete@mail.com
geor-b@me.com

I want to remove everything to the left of the @ symbol so that on each persons profile, I can display @abc.com after their full name.

I tried a number of formulas and the following seems to be the one which I should be using:

RIGHT(A1,LEN(A1)-FIND("@",A1)+1)

or maybe

=MID(A1,FIND("@",A1)+2,256)

However, none of these work and Excel keeps telling me "We found a problem with this formula". Can anybody tell me what's going wrong? I am using the latest version of Excel.

If your email address is in a1 then this will work

=MID(A1,FIND("@",A1,1),LEN(A1)-FIND("@",A1,1)+1)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM