1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
| Sub fusion()
Cell_Départ = "A1"
Dim Fin As Range, i As Long, J As Long, Col As Integer
Dim ModeCalcul As Long
With Application
ModeCalcul = .Calculation
.Calculation = xlCalculationManual
.ScreenUpdating = False
End With
Col = Range(Cell_Départ).Column
Set Fin = Range(Cell_Départ).End(xlDown)(2)
On Error Resume Next
Do
i = J + 1
J = Range(Cells(i, Col), Fin).ColumnDifferences(Cells(i, Col))(0).Row
If Err Then Exit Do
If J > i Then Range(Cells(i + 1, Col), Cells(J, Col)).ClearContents
Loop
If i < Fin.Row Then Range(Cells(i + 1, Col), Fin).ClearContents
Application.Calculation = ModeCalcul
End Sub |
Partager