Private Sub Worksheet_Activate()
Dim tablo, ub&, t, Ncol%, i&, nom$, j%, dat As Date, k&
tablo = Sheets("DIRECTION").Range("C9:K" & Sheets("DIRECTION").[C65536].End(xlUp).Row)
ub = UBound(tablo)
t = [B36].Resize([B65536].End(xlUp).Row - 35, [IV36].End(xlToLeft).Column - 1)
Ncol = UBound(t, 2)
For i = 2 To UBound(t)
nom = t(i, 1)
For j = 2 To Ncol
dat = t(1, j)
For k = 1 To ub
If tablo(k, 1) = nom And tablo(k, 2) = dat Then
t(i, j) = ""
If tablo(k, 8) <> "" Or tablo(k, 9) <> "" Then
If IsNumeric(tablo(i, 8)) And IsNumeric(tablo(k, 9)) _
Then t(i, j) = tablo(k, 8) + tablo(k, 9)
End If
Exit For
End If
Next
Next
Next
[B36].Resize(UBound(t), Ncol) = t
[C37].Resize(UBound(t) - 1, Ncol - 1).NumberFormat = "0.00"
End Sub