Sub Macro2()
[A2].CurrentRegion.TextToColumns Destination:=Range("C2"), DataType:=xlFixedWidth, FieldInfo:=Array(Array(0, 4), Array(6, 1), Array(37, 9), Array(45, 1))
With Range("E2:E" & [E65536].End(xlUp).Row)
.Replace ".", ""
.NumberFormat = "#,##0.00"
.TextToColumns Destination:=Range("E2")
End With
End Sub
[COLOR="DarkSlateGray"][B]Sub toto()
With Selection
Columns(.Cells(1, 1).Offset(0, 4).Column).Insert Shift:=xlToRight
Application.DisplayAlerts = False
.TextToColumns Destination:=.Cells(1, 1).Offset(0, 2), DataType:=xlFixedWidth, _
FieldInfo:=Array(Array(0, xlDMYFormat), Array(6, 1), Array(37, 1), Array(45, 1)), _
DecimalSeparator:=",", ThousandsSeparator:=".", TrailingMinusNumbers:=True
Application.DisplayAlerts = True
Columns(.Cells(1, 1).Offset(0, 4).Column).Delete Shift:=xlToLeft
End With
End Sub[/B][/COLOR]
Sub toto_xl2000()
With Selection
Columns(.Cells(1, 1).Offset(0, 4).Column).Insert Shift:=xlToRight
Application.DisplayAlerts = False
.TextToColumns Destination:=.Cells(1, 1).Offset(0, 2), DataType:=xlFixedWidth, _
FieldInfo:=Array(Array(0, xlDMYFormat), Array(6, 1), Array(37, 1), Array(45, 1)), _
DecimalSeparator:=",", ThousandsSeparator:="."
Application.DisplayAlerts = True
Columns(.Cells(1, 1).Offset(0, 4).Column).Delete Shift:=xlToLeft
End With
End Sub
Sub kaki()
For i = 2 To Range("A65000").End(xlUp).Row
Cells(i, 1).TextToColumns Destination:=Cells(i, 3), DataType:=xlDelimited, Space:=True
dC = Cells(i, 256).End(xlToLeft).Column
Set plg = Range(Cells(i, 3), Cells(i, dC))
T = Application.Transpose(plg.Value)
plg.Clear
Cells(i, 3) = CDate(Format(T(1, 1), "00/00/00"))
For j = 2 To UBound(T) - 1
If T(j, 1) <> "" Then
Cells(i, 4) = Trim(Cells(i, 4) & " " & T(j, 1))
End If
Next
Cells(i, 5) = CCur(Replace(T(UBound(T), 1), ".", ""))
Next
End Sub
Sub kaki2()
Dim tabA, tabB(), i%, j%, k%
Columns("D:J").Clear
Columns("D:E").NumberFormat = "@"
For i = 1 To Range("A65000").End(xlUp).Row
tabA = Split(Cells(i, 1), " ")
For j = 0 To UBound(tabA)
If tabA(j) <> "" Then
ReDim Preserve tabB(0 To x)
tabB(x) = tabA(j)
x = x + 1
End If
Next
Cells(i, 4) = tabB(0)
Cells(i, 5) = tabB(1)
Cells(i, 6) = CDate(Format(tabB(2), "00/00/00"))
For k = 3 To UBound(tabB) - 3
Cells(i, 7) = Cells(i, 7) & tabB(k) & Chr(32)
Next
Cells(i, 7) = Left(Cells(i, 7), Len(Cells(i, 7)) - 1)
Cells(i, 8) = tabB(UBound(tabB) - 2)
Cells(i, 9) = CCur(Replace(tabB(UBound(tabB) - 1), ".", ""))
Cells(i, 10) = CDate(Format(tabB(UBound(tabB)), "00/00/00"))
x = 0
Erase tabA
Erase tabB
Next
Columns("D:J").AutoFit
End Sub