Private Sub CommandButton1_Click()
Dim L As Integer, E As Integer
Dim F As String
L = Sheets("XRT21").Range("A65536").End(xlUp).Row + 1
With Sheets("reponses")
E = .Range("IT3").End(xlToLeft).Column + 1
F = Mid(.Cells(3, .Range("IT3").End(xlToLeft).Column + 1).Address, 2, InStr(2, .Cells(3, .Range("IT3").End(xlToLeft).Column + 1).Address, "$") - 2)
End With
With Sheets("XRT21")
.Range("A" & L).Value = NOM.Value
.Range("B" & L).Value = PRENOM.Value
.Range("C" & L).Value = NOM & " " & PRENOM.Value
.Range("D" & L).Value = DATEQUESTION.Value
End With
With Sheets("reponses")
.Cells(3, E).Value = NOM.Value
.Cells(42, E).FormulaLocal = "=NB.SI(" & F & "$4:" & F & "$35;$A42)"
.Cells(43, E).FormulaLocal = "=NB.SI(" & F & "$4:" & F & "$35;$A43)"
End With
Unload UserForm1
End Sub