PDA

View Full Version : Re-arranging 1 row to multiple rows based on specific data



DarinM
10-29-2015, 12:01 PM
Hi all,

I'll try and give you a quick backstory on this project, i think it will be an annoying one to complete but fairly easy for you guys.

I need to make an email list to send eblasts to our customers, however, the way the data gets exported from my database makes it very difficult to IMPORT into my eblast tool.

Column A - bill to
Column B - ship to
Column C - parent - unique number that could link different billto/ship-tos (same parent company, different sub-companies)
Column D - company
Column E - address (no use)
Column F - address 2 (no use)
Column G - phone (no use)
Column H - email from database 1
Column I - second email from database 1
Column J - first name
Column K - last name
Column L - role at company
Column M - email from database 2
Column N - second email from database 2
Column O - third email from database 2
Column P - fourth email from database 2

Database 2 is more up to date than database 1. database 1 emails were from when the account was first created, database 2 is regularly changed.

The exported data has X emails, 1 name on 1 row. I'd essentially like 1 name, 1 email, 1 row. So if there was 4 emails, 1 name, 1 row, it would be same name on 4 rows, 1 email per row, then highlight the original row to show me which data has been re-organized (then ill delete it later).

I have attached my excel sample with the data examples, as well as explanations of how I'd like to have the data look. I hope it was fairly clear, I tried to break it down via situation, and before/afters.

If you could help write a macro for me to re-organize the 20,000 rows I have...that would be fantastic :)

Darin

DarinM
11-03-2015, 08:50 AM
update

I actually just converted this to 3 vlookups, 3 tabs, each tab compared a unique ID and returned the email, then pasted as values to tab 4, sorted A to Z and it worked great.

now my only question is, is there a way to write a macro to update those 3 vlookups based on tab 1, and return the updated values to tab 4, instead of re-doing the 3 vlookups everytime I update tab 1 (could have more or less values than the existing vlookups, so thats why i would start fresh everytime).

thanks!