Sub Essai()
If ActiveSheet.Name <> "BALANCE ANALYTIQUE" Then Exit Sub
Dim T1, T2, nlm&, n1&, n2&, n3&, i&: nlm = Rows.Count
n1 = Cells(nlm, 2).End(3).Row: n2 = Cells(nlm, 4).End(3).Row
If Cells(n2, 4) = "-" Then n2 = Cells(n2, 4).End(3).Row
n3 = WorksheetFunction.Max(n1, n2): If n3 = 2 Then Exit Sub
n3 = n3 - 2: T1 = [B3].Resize(n3): T2 = [D3].Resize(n3)
For i = 1 To n3
If T1(i, 1) > 0 Then
T2(i, 1) = T1(i, 1): T1(i, 1) = 0
ElseIf T2(i, 1) > 0 Then
T1(i, 1) = T2(i, 1): T2(i, 1) = 0
End If
Next i
Application.ScreenUpdating = 0: [B3].Resize(n3) = T1
[D3].Resize(n3) = T2
End Sub