Sub TCD()
Dim C As Range, Plage As Range, Ligne As Long, Col As Long
With Sheets("Database")
Set Plage = .Range("A2", .Cells(.Rows.Count, 1).End(xlUp))
End With
With Sheets("Expected (2)")
Set C = .Cells(1, .Columns.Count).End(xlToLeft).Offset(, 1)
If C.Column = 2 Then
C.Value = Date
Else
C.Value = DateAdd("ww", 1, Date)
End If
C.NumberFormat = "d/mm/yy"
Col = C.Column
For Each C In Plage
Ligne = Application.Match(C.Value, .[A:A], 0)
.Cells(Ligne, Col) = Cells(Ligne, Col) + 1
Next C
.Cells(7, Col) = Application.Sum(.Range(.Cells(2, Col), .Cells(6, Col)))
End With
End Sub