1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
Sub Cherche()
Dim Plage As Range
Dim Cellule As Range
Dim Posit As Long
Dim NBLig
NBLig = 5
On Error Resume Next
Set Plage = Sheets("GRAND LIVREm").Range(Cells(1, 1), Cells(NBLig, 1))
For Each Cellule In Plage
Posit = Application.WorksheetFunction.Find("AN", Cellule.Value)
If Posit = 2 Then
MsgBox (Cellule.Address(RowAbsolute:=False)) // Affiche $Ax
Selection.TextToColumns Destination:=Cellule.Address(RowAbsolute:=False), DataType:=xlFixedWidth, _
FieldInfo:=Array(Array(0, 1), Array(4, 1), Array(9, 1), Array(16, 1), Array(23, 1), _
Array(32, 1), Array(65, 1), Array(99, 1), Array(113, 1)), TrailingMinusNumbers:=True
Posit = 0
End If
Next
End Sub |
Partager