I am trying to convert email addresses into a Name field with the employee's First and Last Name, capitalizing the first character of each part of the name and keeping the hyphen in any part of the name that has one.
I started with hyphenated first names so taking shmoe_joe-bob@company.com and converting it into Joe-Bob Shmoe
I have a "Conversion" column taking the email address capitalizing the first character of the person's first and last name, keeping any first names with a hyphens.
IFERROR(IF(CONTAINS("-", Email@row) = 1, UPPER(LEFT(Email@row, 1)) + MID(Email@row, 2, FIND("_", Email@row) - 2) + " " + UPPER(MID(Email@row, FIND("_", Email@row, 1) + 1, 1)) + IFERROR(MID(Email@row, FIND("_", Email@row) + 2, IF((FIND("-", Email@row) - FIND("_", Email@row) - 2) >= 0, FIND("-", Email@row) - FIND("_", Email@row) - 2)), "") + IFERROR(UPPER(MID(Email@row, FIND("-", Email@row, 1), 2)), "") + MID(Email@row, FIND("-", Email@row) + 2, LEN(Email@row) - FIND("-", Email@row)), UPPER(LEFT(Email@row, 1)) + MID(Email@row, 2, FIND("_", Email@row) - 2) + " " + UPPER(MID(Email@row, FIND("_", Email@row) + 1, 1)) + MID(Email@row, FIND("_", Email@row) + 2, LEN(Email@row) - FIND("_", Email@row))), "")
Then removing everything after @ LEFT(Conversion@row, FIND("@", Conversion@row, 1) - 1)
Lastly, I flip things into FirstName LastName format
RIGHT([User Name]@row, LEN([User Name]@row) - FIND(" ", [User Name]@row)) + " " + LEFT([User Name]@row, FIND(" ", [User Name]@row))
All this works great keeping hyphenated first names into FirstName LastName format.
Not sure if I've just been working on this ONE formula for days and my brain has just stopped thinking, but I can't seem to move onto hyphenated LAST names and emails with numbers after the section of the first name given to those with similar names (i.e., shmoe_joe2@company.com) so there aren't any duplicate email addresses. So I'm trying to get a formula converting an email address that will:
- Remove @company.com and the underscore symbol _ between the first/last names
- Converting the email so the second half of the email is FirstName and the first half of the email is the LastName
- Capitalizing the first character of each part of the name
- Keeping the hyphens in the first and/or last name (if there is one)
- Removing any numbers
So taking shmoe-smith_joe-bob2@company.com and converting it into Joe-Bob Shmoe-Smith
Any help would be greatly appreciated.