1 2 3 4 5 6 7 8 9 10 11 12 13
| Dim ava As Integer, c As Range, centre As String,cx as string
For ava = 3 To DerniereLigne
cx = Workbooks("Base CPP Historique.xls").Worksheets(w).Cells(2, ava).Value
Set c = .Range(.Cells(4, 2), .Cells(cptline, 2)).Find(cx, LookIn:=xlValues, LookAt:=xlWhole)
If Not c Is Nothing Then
centre = c.Row
Workbooks("Base CPP Historique.xls").Worksheets(w).Cells(x, ava).Value = .Cells(.Range(.Cells(4, 2), .Cells(cptline - 1, 2)).Find(centre, LookAt:=xlWhole).Row, colonne2).Value
Set c = Nothing
End If
Next ava |
Partager