Sub AjusterHauteurLignes()
Dim o As OLEObject, oo As Object, P As Range, ncol%, i&, hmax#, j%, c As Range, a, h#
Set P = Feuil1.UsedRange 'CodeName de la feuill
ncol = P.Columns.Count
Application.ScreenUpdating = False
For i = 1 To P.Rows.Count
hmax = 0
For j = 1 To ncol
Set c = P(i, j)
If c.MergeCells Then
a = c.HorizontalAlignment 'mémorise
With c.MergeArea
.UnMerge 'défusionne
.Rows(1).HorizontalAlignment = xlCenterAcrossSelection 'centre sur plusieurs colonnes
.Rows(1).AutoFit
h = .Rows(1).RowHeight
If h > hmax Then hmax = h
.Merge 'refusionne
j = j + .Columns.Count - 1
End With
c.HorizontalAlignment = a 'restitution
End If
Next j
If hmax Then P.Rows(i).RowHeight = hmax
Next i
End Sub