Hi All,
I have First Name, Last Name and Email. I have to identify the type of email pattern which I had mentioned in Column D. Please find the attachment.
Hi All,
I have First Name, Last Name and Email. I have to identify the type of email pattern which I had mentioned in Column D. Please find the attachment.
Give this a shot:
=IFERROR(IF(ISERROR(FIND(LOWER(B2),C2,1)),$A$1&MID(C2,LEN(A2)+1,FIND("@",C2,1)-LEN(A2)-1),$A$1&MID(C2,LEN(A2)+1,FIND(LOWER(B2),C2,1)-LEN(A2)-1)&$B$1),"FirstInitialLastName")
Something like below. You could use RegEx, but since RegEx is system dependent... I used string manipulation.
Then in D2:Please Login or Register to view this content.
=EmailPattern(A2,B2,C2)
Copy down.
Last edited by CK76; 11-08-2019 at 02:21 PM. Reason: Changed code a bit to reduce redundancy
?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
― Robert A. Heinlein
In some cases only lastname will be in email column.
Example
Greg Piggott [email protected]
The result should come like LastName
Try this then...
Please Login or Register to view this content.
Code is not working
Can't help you without you helping me. How is it not working?Code is not working
Small amendment to code as I noticed one thing. Check for x = lName rather than checking for length.
Please Login or Register to view this content.
Here is another macro that you can consider...
Please Login or Register to view this content.
Last edited by Rick Rothstein; 11-08-2019 at 07:28 PM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks