How to extract anitials from an email adresse?

T

Tippo22

Hi,

i need some help extracting initials from email adresses. All adresses have
the same domain name @qwertyui.dk but they have different lengths of initals,
e.g. aa or aab or aabb, but no more than 4 characters.

Hope you can help

Martin.
 
R

Rick Rothstein

If I understand your question correctly, you want the dk part of the
@qwetyui.dk entry. This should do that for you...

=TRIM(RIGHT(SUBSTITUTE(A1,".",REPT(" ",99)),99))
 
P

Per Jessen

Hi Martin

With the email adress in A1 try this formula in B1:

=LEFT(A1;FIND("@";A1;1)-1)

Regards,
Per
 
M

Mike H

Hi,

When you say 'initials' I assume you mean the bit to the left of the @
If so try this.

Alt+F11 to open VB editor
Right click 'This Workbook' and paste the code below in on the right
call with

=GetName(A1) where A1 contains an Email address

Function GetName(HyperlinkCell As Range)
GetName = Replace(HyperlinkCell.Hyperlinks(1).Address, "mailto:", "")
GetName = Left(GetName, InStr(GetName, "@") - 1)
End Function

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top