Option Explicit
Sub Macro5()
Dim ville$, lig&, col%, ltr$
With ActiveCell
ville = .Value: If ville = "" Then Exit Sub
lig = .Row: If lig < 3 Or lig > 1481 Then Exit Sub
col = .Column: If col <> 5 And col <> 7 And col <> 9 And col <> 11 Then Exit Sub
ltr = Cells(lig, 3)
If ltr = "NUIT" Then
.Offset(4) = ville: If lig <= 1481 Then .Offset(9) = ville
If lig <= 1481 Then .Offset(13) = ville
If lig <= 1481 Then .Offset(18) = ville
If lig <= 1481 Then .Offset(22) = ville
Else If ltr = "MATIN" Then
.Offset(4) = ville: If lig <= 1481 Then .Offset(9) = ville
If lig <= 1481 Then .Offset(13) = ville
END If
End With
End Sub