Function Nbj(Cel As Range)
Dim R As Range
Dim Lc As Integer, Lr As Integer
Lc = Cel.Row - Cel.ListObject.HeaderRowRange.Row ' Ligne cellule dans la table
If Lc = 1 Or Cel = "" Then ' Ligne d'entête pas de calcul
Nbj = ""
Else
Set R = Range([Tableau1[ total date]].Cells(1).Address & ":" & Cel.Address).Find("*", Cel, xlValues, xlWhole, , xlPrevious)
Lr = R.Row - Cel.ListObject.HeaderRowRange.Row ' Ligne trouvée dans la table
If Lr <> Lc Then Nbj = DateDiff("d", [Tableau1[Dates 2]].Rows(Lr), [Tableau1[Dates 2]].Rows(Lc))
End If
End Function