=SIERREUR(DECALER($D10;0;2*COLONNE()-40)-DECALER($C10;0;2*COLONNE()-40);0)
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Rows.Count > 1 Or Target.Columns.Count > 1 Then Exit Sub
If Intersect(Me.[C9:Q16], Target) Is Nothing Then Exit Sub
If Target.Column Mod 2 = 0 Then Exit Sub
Me.Protect UserInterfaceOnly:=True
If VarType(Target.Value) = vbString Then
Target.Resize(, 2).HorizontalAlignment = xlCenterAcrossSelection
Else: Target.Resize(, 2).HorizontalAlignment = xlCenter: End If
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Rng As Range, Cel As Range
Set Rng = Intersect(Me.[C9:P16], Target): If Rng Is Nothing Then Exit Sub
Me.Protect UserInterfaceOnly:=True
For Each Cel In Rng
If Target.Column Mod 2 Then
If VarType(Cel.Value) = vbString Then
Cel.Resize(, 2).HorizontalAlignment = xlCenterAcrossSelection
Else: Cel.Resize(, 2).HorizontalAlignment = xlCenter: End If
End If
Next Cel
End Sub