Thanks Brian. I see the logic now....
I have made the changes you suggested and the ones that should not be there are now out and the missing ones seem to be counted now.
Much appreciated I have been trying to make this work properly for a while...
Regards
Angela