Leighton
Member
Registered: 21st Feb 01
Location: Liverpool
User status: Offline
|
in work a guy is trying to setup a auto email thing from a excel spreddy.
he has go it to work but he has a problem with email addreses.
in the vb text to lookup the email address on the work sheet the below is used
For Each sh In ThisWorkbook.Worksheets
If sh.Range("A1").Value Like "?*@?*.?*" Then
so presumably this means this will search and use email addresses such as
test@test.com?
however a lot of contacts on the list use have more "dots" in their addresses. for
example john.smith@uk.test.com
how do i include this in the vb text to pick up Value Like "?*@?*.?*" AND
"?*.?*@?*.?*" AND ALSO "?*.?*@?*.?*.?*"
is there a way to make it look for these as well?
Thanks
|
JamesMG
Member
Registered: 14th Nov 06
Location: Newcastle-under-Lyme, Staffordshire
User status: Offline
|
whats the format of the sheet? depends on what data is being used etc.. could you not just use @ to find the addresses? so just use "?*@?*" either that or if all the email addresses are within the same column just use reciprication and stick them into an array
|
Paul_J
Member
Registered: 6th Jun 02
Location: London
User status: Offline
|
I don't understand? why not just have a column for email addresses...
and also why search for the . at all?
So have 2 columns
1 column contains Name of staff
2nd column contains Email address..
You want to find email address for person 'Jim Bowens'
So you get the System to search column A for the value Jim Bowens... When found you use that row number, to then get the value of the cell Column B (that row num) ... thus you now have the Email address for Jim Bowens.
|