mid([Reference_Nr],2,1)<>"R" and [Ownership]="M" and [Costed]=blank