Sub CONGES_COMP()
Dim liste, d As Object, e, P As Range, ncol%, i&, j%, k&, x
liste = Array("CONGES", "COMP") 'à adapter
Set d = CreateObject("Scripting.Dictionary")
d.CompareMode = vbTextCompare 'la casse est ignorée
For Each e In liste: d(e) = "": Next
Set P = ActiveSheet.UsedRange
ncol = P.Columns.Count
For i = 2 To P.Rows.Count
For j = 1 To ncol
If d.exists(P(i, j).MergeArea(1).Value) Then
For k = i - 1 To 1 Step -1
x = P(k, j).MergeArea(1)
If d.exists(x) Then Exit For
If Val(x) Then P(k, j).MergeArea(1) = P(i, j).MergeArea(1): Exit For
Next k
End If
Next j, i
End Sub