1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| Sub Recap()
Dim C As Range, Tabl, F As Variant, Plage As Range, Ligne As Long
F = Array(3, 4, 5)
With Sheets(1)
Set Plage = .Range(.[A1], .Cells(.Rows.Count, 1).End(xlUp))
End With
For i = 0 To 2
With Sheets(F(i))
For Each C In .Range(.[A2], .Cells(.Rows.Count, 1).End(xlUp))
Ligne = Application.Match(C.Value, Plage, 0)
If Not IsNumeric(Application.Match(C.Offset(, 1), Sheets(1).Rows(Ligne), 0)) Then
Sheets(1).Cells(Ligne, .Columns.Count).End(xlToLeft).Offset(, 1) = _
C.Offset(, 1).Value
End If
Next C
End With
Next i
End Sub |
Partager