Public Function NbCellFus(ByRef PlagSourc As Range) As Integer
Dim TEMP() As Boolean, i As Integer, j As Integer
Dim iPrim As Integer, jPrim As Integer
With PlagSourc
ReDim TEMP(.Rows(1).Row To .Rows(1).Row + .Rows.Count - 1, .Columns(1).Column To .Columns(1).Column + .Columns.Count - 1)
End With
For i = LBound(TEMP, 1) To UBound(TEMP, 1)
For j = LBound(TEMP, 2) To UBound(TEMP, 2)
If TEMP(i, j) = False Then
NbCellFus = NbCellFus + 1
For iPrim = i To i + Cells(i, j).MergeArea.Rows.Count - 1
For jPrim = j To j + Cells(i, j).MergeArea.Columns.Count - 1
TEMP(iPrim, jPrim) = True
Next jPrim
Next iPrim
End If
Next j
Next i
End Function