Merci pour vos réponses.
En intervertissant les deux lignes cela ne change malheureusement pas le résultat.
Effectivement, il y a un problème d'incrémentation, mais je ne vois pas trop comment formuler cà en VBA... J'ai modifié comme suivant mais cela ne fonctionne toujours pas. La fusion de 3 cellules successives est bonnes mais pas la valeur implémentée dans la cellule fusionnée...
Private Sub CommandButton2_Click()
Dim i As Integer
For i = 3 To 2000 '2000 for margin
With Sheets("Units")
If .Cells(i, "D") <> "" And .Cells(i + 1, "D") <> "" Then
If .Cells(i, "D") = .Cells(i + 1, "D") And .Cells(i, "A") = .Cells(i + 1, "A") Then
.Cells(i, "S") = .Cells(i, "R") * .Cells(i + 1, "R")
.Range(Cells(i, "S"), Cells(i + 1, "S")).Merge
If .Cells(i, "D") = .Cells(i - 1, "D") And .Cells(i, "A") = .Cells(i - 1, "A") Then
.Cells(i, "S") = .Cells(i, "R") * .Cells(i - 1, "S")
End If
ElseIf .Cells(i, "A") <> .Cells(i + 1, "A") Then
.Cells(i, "S") = ""
End If
ElseIf .Cells(i, "D") = "" Then
.Cells(i, "S") = ""
End If
End With
Next
End Sub