I am trying to automate this process, as I have hundreds of rows to go through. Any help is greatly appreciated!
We are moving company contacts from Outlook and into another program. When I export contacts from Outlook to a .csv file, each company's information is contained in a single row.
Some companies only have (1) email address, while other companies have (3) email addresses. They are listed under the "E-Mail Address", "E-Mail 2 Address" and "E-mail 3 Address" columns.
Here is what I would like to automate:
1) If there is an email address in the "E-Mail 2 Address" column, a new row needs to be added below the existing row, and the email address from "E-Mail 2 Address" needs to go in the "E-Mail Address" column in the new row. Then, all other information needs to be duplicated in the newly created row (Company Name, Street, City, State, Zip, Phone, etc. is all duplicated in the new row, matching the row above it).
2) If there is an email address in the "E-Mail 2 Address" AND the "E-Mail 3 Address" columns, it is the same process as above, but (2) new rows need to be created: (1 for each of the emails). All of the other columns (Company Name, Street, City, State, Zip, Phone, etc. is all duplicated, so there will be (3) rows with the same information).
Example:
(all information below is dummy)
This needs to become (see below)
Final Result:
Thanks,
Doug
We are moving company contacts from Outlook and into another program. When I export contacts from Outlook to a .csv file, each company's information is contained in a single row.
Some companies only have (1) email address, while other companies have (3) email addresses. They are listed under the "E-Mail Address", "E-Mail 2 Address" and "E-mail 3 Address" columns.
Here is what I would like to automate:
1) If there is an email address in the "E-Mail 2 Address" column, a new row needs to be added below the existing row, and the email address from "E-Mail 2 Address" needs to go in the "E-Mail Address" column in the new row. Then, all other information needs to be duplicated in the newly created row (Company Name, Street, City, State, Zip, Phone, etc. is all duplicated in the new row, matching the row above it).
2) If there is an email address in the "E-Mail 2 Address" AND the "E-Mail 3 Address" columns, it is the same process as above, but (2) new rows need to be created: (1 for each of the emails). All of the other columns (Company Name, Street, City, State, Zip, Phone, etc. is all duplicated, so there will be (3) rows with the same information).
Example:
(all information below is dummy)
This needs to become (see below)
Company | Street | City | State | Zip Code | Business Phone | E-Mail Address | Email 2 Address | Email 3 Address |
Rack Systems | 55 Stadium Road | Hinckley | CO | 56258 | (785) 555-6696 | estimating@racksys.com | ||
Bob's Painting | 4527 Long Avenue | Boulder | CO | 42685 | (859) 555-6895 | bob@painting.com | steve@painting.com | mark@painting.com |
Frank's Welding | 699 59th Street | Vail | IL | 42845 | (989) 555-8458 | fwash@fweld.com | blong@fweld.com | |
United Structural Steel Co. | PO Box 5874 | Rockford | CO | 42698 | (458) 555-1245 | carl@ussteel.com | ||
Anytime Roofing Inc. | 9885 State Street | Littletown | CO | 42574 | (778) 555-6985 | w_shram@anytimeroof.com | b_bender@anytimeroof.com | c_carlson@anytimeroof.com |
Final Result:
Company | Street | City | State | Zip Code | Business Phone | E-Mail Address | Email 2 Address | Email 3 Address |
Rack Systems | 55 Stadium Road | Hinckley | CO | 56258 | (785) 555-6696 | estimating@racksys.com | ||
Bob's Painting | 4527 Long Avenue | Boulder | CO | 42685 | (859) 555-6895 | bob@painting.com | ||
Bob's Painting | 4527 Long Avenue | Boulder | CO | 42685 | (859) 555-6895 | steve@painting.com | ||
Bob's Painting | 4527 Long Avenue | Boulder | CO | 42685 | (859) 555-6895 | mark@painting.com | ||
Frank's Welding | 699 59th Street | Vail | IL | 42845 | (989) 555-8458 | fwash@fweld.com | ||
Frank's Welding | 699 59th Street | Vail | IL | 42845 | (989) 555-8458 | blong@fweld.com | ||
United Structural Steel Co. | PO Box 5874 | Rockford | CO | 42698 | (458) 555-1245 | carl@ussteel.com | ||
Anytime Roofing Inc. | 9885 State Street | Littletown | CO | 42574 | (778) 555-6985 | w_shram@anytimeroof.com | ||
Anytime Roofing Inc. | 9885 State Street | Littletown | CO | 42574 | (778) 555-6985 | b_bender@anytimeroof.com | ||
Anytime Roofing Inc. | 9885 State Street | Littletown | CO | 42574 | (778) 555-6985 | c_carlson@anytimeroof.com |
Thanks,
Doug