Bonjour,
Une proposition similaire à bouben.
Cdlt.
Public Sub DEMO()
Dim lastRow As Long, rw As Long, startRow As Long, endRow As Long
With Application
.DisplayAlerts = False
.ScreenUpdating = False
End With
With ActiveSheet
lastRow = .Cells(Rows.Count, 1).End(xlUp).Row
startRow = 2
For rw = 2 To lastRow
If Not .Cells(rw + 1, 1) = .Cells(rw, 1) Then
endRow = .Cells(rw, 1).Row
With .Range(.Cells(startRow, 1), .Cells(endRow, 1))
.HorizontalAlignment = xlLeft
.VerticalAlignment = xlTop
.MergeCells = True
End With
startRow = endRow + 1
End If
Next rw
End With
Application.DisplayAlerts = True
End Sub