The dates aren't extremely important. When I used your macro with a small test sample I removed the date field. It worked great, the date would be ideal to pull the acct number with the lowest date.
The numbers aren't sequential either, which makes another problem. So the min(account) doesn't necessarily have to be the earliest one issued. I'm not sure how to QC this after the fact. I have my own solution that isn't great and very slow, I'm taking known accounts that are good examples: Say someone was acquired from a different company, so they have a reference number that ties it to the account but was never a real account number, then loses their card every weekend at a bar, so they have 20 different card numbers.
Using an example like that I can track down all the individual cross reference numbers manually and see if my process works, but that doesn't lend a great deal of confidence to the population.
... View more