parsing email address into another email string

S

ssylee

I'm trying to parse a list of email addresses into a different type of
string as follows:

For example, if I want to use [email protected] to make a string
that says "[email protected]",
how would you suggest me to separate the content that is before and
after the '@' character?

Thanks.
 
R

Rick Rothstein

If your text string is really what you showed us, then you don't need to
parse anything... simply replace the @ symbol in the address with an = sign
and then concatenate the fixed text around it...

="ftm-officers-subscribe-"&SUBSTITUTE(A1,"@","=")&"@somelist.com"
 
R

Rick Rothstein

Although now that I notice we are in the programming newsgroup, you probably
want this in VBA. The structure is the same except that the function name is
Replace in VB...

="ftm-officers-subscribe-" & Replace(Range("A1").Value, "@", "=") &
"@somelist.com"

The above will probably word-wrap in your newsreader, but it is supposed to
be all on one line.
 
Top