Sub Horaires()
Dim ws As Worksheet
Dim rng As Range
Dim i As Long, lastRow As Long, firstRow As Long
Dim startTime As String, endTime As String, breakTime As String
Dim employeeName As String
Set ws = ThisWorkbook.Sheets("Feuil1")
lastRow = ws.Cells(ws.Rows.Count, "A").End(xlUp).Row ' Dernière ligne en colonne A
firstRow = lastRow + 3
Application.ScreenUpdating = False
'Entêtes horaires
ws.Cells(firstRow, "C").Value = "Horaires Début"
ws.Cells(firstRow, "D").Value = "Horaires Fin"
ws.Cells(firstRow, "E").Value = "Pauses"
' Commence à la ligne 8 et saute une ligne à chaque fois
' pour passer à l'employé suivant
For i = 8 To lastRow Step 2
employeeName = ws.Cells(i, "A").Value ' Nom de l'employé
startTime = Left(ws.Cells(i, "C").Value, 5) ' Heure de début
breakTime = Mid(ws.Cells(i, "C").Value, 7, 5) ' Heure de pause
endTime = Mid(ws.Cells(i + 1, "C").Value, 7, 5) ' Heure de fin
' Écrit les données horaires
firstRow = firstRow + 1
ws.Cells(firstRow, "A").Value = employeeName
ws.Cells(firstRow, "C").Value = startTime
ws.Cells(firstRow, "D").Value = endTime
ws.Cells(firstRow, "E").Value = breakTime
Next i
Application.ScreenUpdating = True
End Sub