I wish to either automatically add code as I create an Excel macro, or if necessary manually insert the code into an existing macro: Construct email addresses in a column, from another column whose cells contain firstname lastname. Example: John Smith in column A becomes [email protected] in column B. The mailbox name is always the same, of course. The code will process all the rows in the column.
CodePudding user response:
So:
=left(A1,1)&mid(A1,find(" ",A1,1) 1,20)&"@aol.com"
I have just checked the order of the arguments in mid() and it works.
Note if there are double barreled names then you have to consider that.
CodePudding user response:
You may try in this way as well, if there is only FIRST NAME & LAST NAME,
• Formula used in cell B2
=CONCAT(LEFT(A2),REPLACE(A2,1,FIND(" ",A2),""),"@aol.com")