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 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
| Sub Dinteraction()
'Cells(5, 3).Value = Range("c65000").End(xlUp).Row
'Cells(5, 4).Value = Range("i65000").End(xlUp).Row
For A = 13 To Range("e65000").End(xlUp).Row
Cells(A, 5).Value = ""
Cells(A, 6).Value = ""
Next
For I = 13 To Range("c65000").End(xlUp).Row
If Cells(I, 3).Value <> "" Then
Cells(I, 5) = ""
Cells(I, 6) = ""
If Cells(I, 3) <> "" Then
Cells(I, 5) = DateDiff("m", Cells(I, 4).Value, Date)
For J = 13 To Range("i65000").End(xlUp).Row
If Cells(J, 9) <> "" Then
If Cells(I, 3).Value Like Cells(J, 9).Value Then
Cells(I, 6) = Cells(J, 10)
End If
End If
Next
End If
End If
Next
End Sub |
Partager