select testdup set order to CompMe go top *-- init to unequal to save cycles in loop lcCompMe = iif(testdup.CompMe=="!", "?", "!") scan if m.lcCompMe == testdup.CompMe delete while m.lcCompMe == testdup.CompMe endif lcCompMe = testdup.CompMe endscanshould be enough, as the delete positions on the next "different".