Hi guys,
I have figured out how to create firstname.lastname@company.com from a list of names like Mike Jones using Excel functions.
I would like to do the same using VBA
So that my boss would have a column to list the attendees of a training course and an empty column on the right which will automatically display the email address. All the email addresses are in our company, so all they all end in @company.com:
A B
Mike Jones mike.jones@company.com
Paula Forester paula.forrester@company.com
Paul van der Merwe paul.vandermerwe@company.com
OR if you could create this whole process into a single formula (rather than VBA) that would work too. At the moment I extract the first name with
=FIND(" ",'Delegate lists'!K9) - to find the space between the first name and last name
=LEFT('Delegate lists'!K9,B2-1) to extract everything to the left of the " "
=LEN('Delegate lists'!K9) to find the length of the total name
=MID('Delegate lists'!K9,B2+1,D2-B2) to extract the last name
=SUBSTITUTE(E2, " ", "") to take out any spaces in the last name like in the case of Paul van der Merwe
=C2&"."&F2&"@company.com" to create the basic email address
=LOWER(Sheet1!G2) to create the email address in lower case
Any ideas?? Thanks 1,000,000
I have figured out how to create firstname.lastname@company.com from a list of names like Mike Jones using Excel functions.
I would like to do the same using VBA
So that my boss would have a column to list the attendees of a training course and an empty column on the right which will automatically display the email address. All the email addresses are in our company, so all they all end in @company.com:
A B
Mike Jones mike.jones@company.com
Paula Forester paula.forrester@company.com
Paul van der Merwe paul.vandermerwe@company.com
OR if you could create this whole process into a single formula (rather than VBA) that would work too. At the moment I extract the first name with
=FIND(" ",'Delegate lists'!K9) - to find the space between the first name and last name
=LEFT('Delegate lists'!K9,B2-1) to extract everything to the left of the " "
=LEN('Delegate lists'!K9) to find the length of the total name
=MID('Delegate lists'!K9,B2+1,D2-B2) to extract the last name
=SUBSTITUTE(E2, " ", "") to take out any spaces in the last name like in the case of Paul van der Merwe
=C2&"."&F2&"@company.com" to create the basic email address
=LOWER(Sheet1!G2) to create the email address in lower case
Any ideas?? Thanks 1,000,000