Extract company name from email address with multiple values after @

candymycandy

New Member
Joined
Jun 14, 2022
Messages
17
Office Version
  1. 365
Platform
  1. Windows
Hi,

I have a formula that extracts the domain/company name from an email address after the @ sign when the format is BobSmith@Company.com
=MID(LEFT(D748,FIND(".",D748,FIND("@",D748))-1),FIND("@",D748)+1,99)

Is it possible to do this to extract the domain/company when the email address is in the format BobSmith@UK.Company.com please?

Thanks in advance for any help!
 
How about
Fluff.xlsm
AB
1
2BobSmith@Company.comCompany
3BobSmith@UK.Company.comCompany
4BobSmith@UK.Company.co.ukCompany
5BobSmith@Company.co.ukCompany
6BobSmith@ab.co.ukab
7BobSmith@ab.comcom
Lists
Cell Formulas
RangeFormula
B2:B7B2=LET(s,TEXTSPLIT(TEXTAFTER(A2,"@"),"."),TAKE(FILTER(s,LEN(s)=MAX(LEN(s))),,1))


But you are going to have problems with companies that only have 2 letters.
I can work around the 2 letters thing as there aren't going to be too many like that. Thank you this has done it!

Thanks all.
 
Upvote 0

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Glad we could help & thanks for the feedback.
 
Upvote 1

Forum statistics

Threads
1,223,952
Messages
6,175,594
Members
452,656
Latest member
earth

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top