Re : Stat
Bonsoir
Une proposition
Private Sub UserForm_Initialize()
Dim PremDate, DerDAte, FinPERIODE, DC, DA, FLY, ANN, BOUCH, MAG
PremDate = Sheets(1).Range("A2").Value
DerDAte = Sheets(1).Range("A65536").End(xlUp).Row
FinPERIODE = Cells(DerDAte, 1).Value
TextBox7 = PremDate
TextBox8.Value = FinPERIODE
DC = Application.WorksheetFunction.CountIf(Range(Cells(2, 4), Cells(DerDAte, 4)), "x")
DA = Application.WorksheetFunction.CountIf(Range(Cells(2, 5), Cells(DerDAte, 5)), "x")
FLY = Application.WorksheetFunction.CountIf(Range(Cells(2, 6), Cells(DerDAte, 6)), "Flyers")
ANN = Application.WorksheetFunction.CountIf(Range(Cells(2, 6), Cells(DerDAte, 6)), "Annuaire")
BOUCH = Application.WorksheetFunction.CountIf(Range(Cells(2, 6), Cells(DerDAte, 6)), "Bouche a oreille")
MAG = Application.WorksheetFunction.CountIf(Range(Cells(2, 6), Cells(DerDAte, 6)), "Magasin")
TextBox1.Value = DC
TextBox2.Value = DA
TextBox3.Value = FLY
TextBox4.Value = ANN
TextBox5.Value = BOUCH
TextBox6.Value = MAG
End Sub