Thanks. I think TomKari is right, some text pre-processing (with "translate" or so) can´t be avoided. (Sorry, I didn´t mention that there are both values with and without a trailing minus). I will use: Number2=Input(Compress(Translate(Translate(TS,'','.'),'.',',')),TrailSgn15.); (In this case ',' is the decimal and '.' the thousands seperator). Data A; Input TS $20.; Sign=Index(TS,'-'); If Sign ge 1 Then Number=(Input(Substr(TS,1,Length(TS)-1),Commax15.3))*-1; Else Number=(Input(TS,Commax15.3)); Format Number 15.4; /* without Substr: */ Number2=Input(Compress(Translate(Translate(TS,'','.'),'.',',')),TrailSgn15.); Format Number2 15.4; Datalines; 100,008 100,008- 1555,458 1555,458- 2,04 2,04- 4.000,4 4.000,4- 112.000,4 112.000,4- 123.456.789,012 123.456.789,012- ; Run;
... View more