>..until you com at the end of the process and because table 4 is the last there are not enough records left of table 4 to delete, because you will violate the rule there must be SUM(D1:Dt)-G records deleted. For table 1,2 and maybe 3 everything will go ok, but reaching table 4 you can't do what you want, because some records of table 4 tou will want to delete, but they are the last existing member of a small set of duplicates, so you can't. That's why you have to backtrack at that moment, but how...
Table1 Table2 Table3 Table4
N1 recs N2 recs N3 recs N4 recs
M1 in dups list M2 in dups list M3 in dups list M4 in dups list
Dups
ID Name Table1 Table2 Table3 Table4
1 Test1 .T. .T. .F. .F.
Now, having this info, how would you solve the problem?
If it's not broken, fix it until it is.
My Blog