alinka
Board Regular
- Joined
- Oct 30, 2002
- Messages
- 70
Hi Excel wizards,
I am a newbie to excel and have a complicated problem. See spreadsheet below for reference, plz.
This is what I need to do:
1) I regularly get a large amount of name data in columns A through C. Each row has an email syntax in Column D. In Column E, I created a formula that writes an email address for the corresponding syntax. I have 11 email syntaxes in total.
2) I need a formula that can read an email syntax in D, and use one of my 11 formulas to create an email address. In other words, I want the formula to do this:
a) IF we find "first.last" in D, use formula =A2&"."&C2&(MID(D2,(FIND("@",D2)),50))
b) IF we find "first_last" in D, use formula =A3&"_"&C3&(MID(D3,(FIND("@",D3)),50))
c) IF we find "first.m.last" in D, use formula =A4&"."&(IF(B4="","",(LEFT(B4,1))&"."))&C4&(MID(D4,(FIND("@",D4)),50))
and so on for the next 8 syntaxes that are shown in D.
So, there are 11 IF statements, that need to be combined into 1 formula. How can I go about doing this??? Or do you envision an easier way? Is it possible to write a vb code that would do this? ANY HELP IS APPRECIATED. THANKS!!!!
I am a newbie to excel and have a complicated problem. See spreadsheet below for reference, plz.
This is what I need to do:
1) I regularly get a large amount of name data in columns A through C. Each row has an email syntax in Column D. In Column E, I created a formula that writes an email address for the corresponding syntax. I have 11 email syntaxes in total.
2) I need a formula that can read an email syntax in D, and use one of my 11 formulas to create an email address. In other words, I want the formula to do this:
a) IF we find "first.last" in D, use formula =A2&"."&C2&(MID(D2,(FIND("@",D2)),50))
b) IF we find "first_last" in D, use formula =A3&"_"&C3&(MID(D3,(FIND("@",D3)),50))
c) IF we find "first.m.last" in D, use formula =A4&"."&(IF(B4="","",(LEFT(B4,1))&"."))&C4&(MID(D4,(FIND("@",D4)),50))
and so on for the next 8 syntaxes that are shown in D.
So, there are 11 IF statements, that need to be combined into 1 formula. How can I go about doing this??? Or do you envision an easier way? Is it possible to write a vb code that would do this? ANY HELP IS APPRECIATED. THANKS!!!!
email-syntax.xls | |||||||
---|---|---|---|---|---|---|---|
A | B | C | D | E | |||
1 | FirstName | Middle | LastName | EmailSyntax | EmailFormula | ||
2 | Alan | J | Lacy | first.last@company.com | Alan.Lacy@company.com | ||
3 | William | C | White | first_last@company.com | William_White@company.com | ||
4 | Michael | Buxton | first.m.last@company.com | Michael.Buxton@company.com | |||
5 | Jerome | Be | Karlin | first_m_last@company.com | Jerome_B_Karlin@company.com | ||
6 | William | Jack | Rudolphsen | first_m_last@company.com | William_J_Rudolphsen@company.com | ||
7 | Mark | A | Wagner | flast@company.com | MWagner@company.com | ||
8 | Robert | M | Kral | lastf@company.com | KralR@company.com | ||
9 | William | L | Hubbs | fmlast@company.com | WLHubbs@company.com | ||
10 | Alan | J | Lacy | firstlast@company.com | AlanLacy@company.com | ||
11 | Jerome | Karlinsky | FLast>7@company.com | JKarlins@company.com | |||
12 | William | Rudolphsen | FLast>8@company.com | WRudolphs@company.com | |||
Sheet1 |