Marc you are 100% correct regarding accountancy/financial rules but the data is imported for several companies to reconcile the intercompany loan accounts so the references in this instance are not unique

The coding may be very complicated and if so, don't spend much time on it. Would be nice to have as would save a lot of manual ticking