Posts

Showing posts with the label LEN

Excel - FIND Function

Image
FIND returns the position of one text string in another text string. For example, you may want to know position of "@" in an email address. If we know position of "@" in an email address, we can further extract the domain name of an email address. Suppose you have a list of email addresses below. 1. Find position of "@" in the email address. The formula is: =FIND("@", A2) For example, "@" is the 6th character in the "alice@apple.com", so it returns a value of 6. 2. Calculate length of email address, the LEN function is used. =LEN(A2) 3. Based on length of an email address and position of "@" in it, we use MID function to extract the domain name. =MID(A2, B2+1, C2-B2) "B2+1" is the first character after the "@" sign, which is 7 in the first email address. "C2-B2" is the number of characters after the "@", which is 9 in the first email address. The MID function reads the emai...