Public d As Object 'mémorise la variable
Function Calcul(num As Range, dat As Range) As String
Calcul = d(num & Chr(1) & dat.Value2)
End Function
Sub Dico()
Dim tablo, i&, dat1, dat2, j&
Set d = CreateObject("Scripting.Dictionary")
tablo = Sheets("Base").[A1].CurrentRegion.Resize(, 6)
For i = 2 To UBound(tablo)
dat1 = tablo(i, 5): dat2 = tablo(i, 6)
If IsDate(dat1) And IsDate(dat2) Then
For j = dat1 To dat2
d(tablo(i, 1) & Chr(1) & j) = tablo(i, 4)
Next j
End If
Next
End Sub