Question: For example, 
I have a column with email addresses and I want to remove everything before the @ sign and everything after the '.' so I can attain the company names. 
Such as: 

```
Emails
loo@yahoo.com
christina@google.com
rachel@espn.com
john@apple.com
ahmed@microsoft.com

```

I want to create a new column that looks like this: 

```
Companies
yahoo
google
espn
apple
ahmed

```

What is a function I can use to attain this new column?

Answer: 
You can easily use Mid and Find functions.

Mid gives you the substring from one text with arguments : text from which to find, start and no. of characters to be extracted.

And find returns the position of character in the word .

Use this formula in A2 cell and A1 cell contains your string

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

```
with data in **A2**, in **B2** enter:

```
=SUBSTITUTE(MID(A2,FIND("@",A2)+1,9999),".com","")

```

[![enter image description here](https://i.stack.imgur.com/nrYL9.png)](https://i.stack.imgur.com/nrYL9.png)

This will work for all emails ending in *.com* and if there are some records that do not have *com* at the end, use:

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

```

This will handle records like:

```
darth.vader@deathstar.com

```

in which a dot occurs before the **@**