function formattage(champ) bidule= form1(champ).value if trim(bidule) <> "" then bidule=replace(bidule," ","") if instr(bidule, "")=0 and len(bidule)>2 then newbidule=mid(bidule,1,len(bidule)-2) & "" & right(bidule,2) form1(champ).value=newbidule else form1(champ).value=bidule end if end if end function