Function Bornes(heures As Range, plage As Range) As String
Dim i%, flag As Boolean
For i = 1 To plage.Count
If Not flag And plage(i) = 1 Then Bornes = Trim(Bornes & " " & heures(i).Text) & "-": flag = True
If flag And plage(i) = "" Then Bornes = Bornes & heures(i - 1).Text: flag = False
Next
If Right(Bornes, 1) = "-" Then Bornes = Bornes & heures(plage.Count).Text
End Function