format number

  • Thread starter Thread starter sal21
  • Start date Start date
S

sal21

in the cloumn C2:C2500 in text format, i have this value

282215,82
8525,73
68574,93
10652,78
2722,29
4075,71
21283,73
....

this number is imported fronm a text file, from this line

var_CAUS = Trim(Mid(riga, 65, 14))

my prob is to insert a "." and trnsform in

282.215,82
8.525,73
68.574,93
10.652,78
2.722,29
4.075,71
21.283,73

automaticly whe the macro import the data string
 
-----Original Message-----
in the cloumn C2:C2500 in text format, i have this value

282215,82
8525,73
68574,93
10652,78
2722,29
4075,71
21283,73
....

this number is imported fronm a text file, from this line

var_CAUS = Trim(Mid(riga, 65, 14))

my prob is to insert a "." and trnsform in

282.215,82
8.525,73
68.574,93
10.652,78
2.722,29
4.075,71
21.283,73

automaticly whe the macro import the data string.

If Len(var_CAUS)>6 Then _
var_CAUS = Left(var_CAUS,Len(var_CAUS)-6) & "." _
& Right(var_CAUS,6)
 
Back
Top