Within single cell, return text value from between 2 consistent known border values

insdotwest

New Member
Joined
Feb 12, 2015
Messages
4
Hello, everyone. My first post/question. Thank you in advance for the help.

I need to determine unique company names from within a list of clients, 12,000+. There are numerous variations on how the company names are presented. I don't feel like trying in Excel to go after disambiguating this.

Fortunately I have email addresses associated, so something with some consistency. But I still need to get to a count of unique names. So, I am orienting upon the domain name, between the "@" and ".com".

How do I return this text value which is in a single cell? I need to do this so I can then know how many unique companies I have within this list, for which I will then simply run a FREQUENCY formula?

Thoughts? Much obliged.
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
This should get you started:

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

Assuming mail address is in A1, this will return everything inbetween "@" and ".c" in the email address. You could modify this if you have different TLDs (such as .org or .ch)
 
Upvote 0
Hello, everyone. My first post/question. Thank you in advance for the help.

I need to determine unique company names from within a list of clients, 12,000+. There are numerous variations on how the company names are presented. I don't feel like trying in Excel to go after disambiguating this.

Fortunately I have email addresses associated, so something with some consistency. But I still need to get to a count of unique names. So, I am orienting upon the domain name, between the "@" and ".com".

How do I return this text value which is in a single cell? I need to do this so I can then know how many unique companies I have within this list, for which I will then simply run a FREQUENCY formula?

Thoughts? Much obliged.

you can use =find("@",A1) to locate the @, and
=find(".com",A1) for the .com

then use =MID() to extract the middle bit,
=MID(A1,FIND("@",A1)+1,FIND(".com",B4)-FIND("@",B4)-1)
 
Upvote 0
This should get you started:

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

Assuming mail address is in A1, this will return everything inbetween "@" and ".c" in the email address. You could modify this if you have different TLDs (such as .org or .ch)



Thank you, eddvrs! Perfect. I appreciate the solutio and education.
insdotwest
 
Upvote 0
Thank you, AlanY! As with eddvrs, you were on the money, and I am thankful for your help in solution and education.
insdotwest
 
Upvote 0
abccompany@zzz.com

how does zzz help you determine if abcccompany is the same as abccompany if they are both .com

@ oldbrewer: I was looking for the simplest way of getting at how many individuals I had and how many unique companies were in this list. Of all my data, because of poor data entry to begin with, I could not rely on 'company name', so the domain name looked to be the area within which I'd find the greatest consistency. It also had the added effect of breaking across subsidiary names because these too resolved to a consistent domain name.
 
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,774
Members
452,353
Latest member
strainu

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