Need some help with a Macro - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Need some help with a Macro

paulrbeerspaulrbeers Posts: 2Member
Here's my problem, I have two work sheets. One is the following:

MainID; ID2; ID3; ID4; Date; Date2; UpdatedBy

Currently looks something like this (data that is)
1910; 153; 153; 11; 10/12/2010 15:52; 10/18/2010 15:51; 367
1912; 201; 201; 13; 12/24/2011 12:31; 12/31/2011 18:21; 213

The issue is that we are updating the MainID to a new set of ID's. It is NOT a 1:1 ration so I can't just do a vlookup. My Second Worksheet is as follows:

MainID; NewID

NewID is currently a list of the different NewID's broken out by Commas. it looks something like this:

1910; 2191
1912; 2189,2190,2191

In some cases, the old MainID may no longer even exist and in those cases I wouldn't want it to show.

Based on the data above, I would expect the end result to be:
2191; 153; 153; 11; 10/12/2010 15:52; 10/18/2010 15:51; 367
2189; 201; 201; 13; 12/24/2011 12:31; 12/31/2011 18:21; 213
2190; 201; 201; 13; 12/24/2011 12:31; 12/31/2011 18:21; 213
2191; 201; 201; 13; 12/24/2011 12:31; 12/31/2011 18:21; 213

Notice all of the columns past the first are just copies, and rows went from 2 to 4 since the second set of data (1912) has 3 different entries.

I can reformat the second column (i.e. NewID) any way necessary, I'm just stating how it currently is.

I tend to be very generous when it comes to saving me time!! Just let me know your email address and I will send cash via Paypal if the function does what I need it to!
Sign In or Register to comment.