Bonjour
Nouvelle version
Option Explicit
Dim tablo
Dim i&, j&, ln&, lnD&, lnF&, n&, nbMax&, dteD, dteF
Sub calculer()
Range("A1").CurrentRegion.Sort key1:=Range("B2"), order1:=xlAscending, Header:=xlYes
tablo = Range("A1").CurrentRegion
nbMax = 0
For i = 2 To UBound(tablo, 1) - 1
dteD = tablo(i, 2)
dteF = dteD + tablo(i, 4)
n = 0
For ln = i + 1 To UBound(tablo, 1)
If tablo(ln, 2) >= dteD And tablo(ln, 2) <= dteF Then
n = n + 1
If n > nbMax Then
nbMax = n
lnD = i
End If
Else
Exit For
End If
Next ln
Next i
Range("h9") = nbMax + 1
Range("I11") = tablo(lnD, 2)
Range("I13") = tablo(lnD + nbMax, 2)
Range("H4,B" & lnD & ":B" & lnD + nbMax).Select
End Sub
Bye !