Bonsoir les couche tard...
Je me pose une question existentielle...
Existe t il un moyen plus simple d ecrire ce morceau de code :
Peut être un cerveau moins embrumé que le mieux serait plus efficace...
Merci,
J.
Je me pose une question existentielle...
Existe t il un moyen plus simple d ecrire ce morceau de code :
With Sheets("Feuil1")
A1C = Application.WorksheetFunction.CountIf(.Range("C1:C" & .Range("A65536").End(xlUp).Row), "X") * "0,01"
A2C = Application.WorksheetFunction.CountIf(.Range("D1" & .Range("A65536").End(xlUp).Row), "X") * "0,02"
A5C = Application.WorksheetFunction.CountIf(.Range("E1:E" & .Range("A65536").End(xlUp).Row), "X") * "0,05"
A10C = Application.WorksheetFunction.CountIf(.Range("F1:F" & .Range("A65536").End(xlUp).Row), "X") * "0,1"
A20C = Application.WorksheetFunction.CountIf(.Range("G1:G" & .Range("A65536").End(xlUp).Row), "X") * "0,2"
A50C = Application.WorksheetFunction.CountIf(.Range("H1:H" & .Range("A65536").End(xlUp).Row), "X") * "0,5"
A1E = Application.WorksheetFunction.CountIf(.Range("I1:I" & .Range("A65536").End(xlUp).Row), "X") * "1"
A2E = Application.WorksheetFunction.CountIf(.Range("J1:J" & .Range("A65536").End(xlUp).Row), "X") * "2"
AEC = Application.WorksheetFunction.CountIf(.Range("K1:K" & .Range("A65536").End(xlUp).Row), "X") * "2"
B1C = Application.WorksheetFunction.CountIf(.Range("M1:M" & .Range("A65536").End(xlUp).Row), "X") * "0,01"
B2C = Application.WorksheetFunction.CountIf(.Range("N1:N" & .Range("A65536").End(xlUp).Row), "X") * "0,02"
B5C = Application.WorksheetFunction.CountIf(.Range("O1:O" & .Range("A65536").End(xlUp).Row), "X") * "0,05"
B10C = Application.WorksheetFunction.CountIf(.Range("P1" & .Range("A65536").End(xlUp).Row), "X") * "0,1"
B20C = Application.WorksheetFunction.CountIf(.Range("Q1:Q" & .Range("A65536").End(xlUp).Row), "X") * "0,2"
B50C = Application.WorksheetFunction.CountIf(.Range("R1:R" & .Range("A65536").End(xlUp).Row), "X") * "0,5"
B1E = Application.WorksheetFunction.CountIf(.Range("S1:S" & .Range("A65536").End(xlUp).Row), "X") * "1"
B2E = Application.WorksheetFunction.CountIf(.Range("T1:T" & .Range("A65536").End(xlUp).Row), "X") * "2"
B2EC = Application.WorksheetFunction.CountIf(.Range("U1:U" & .Range("A65536").End(xlUp).Row), "X") * "2"
End With
If ComboBox1 = "A" Then
TextBox1.Value = VJUL1C + VJUL2C + VJUL5C + VJUL10C + VJUL20C + VJUL50C + VJUL1E + VJUL2E + VJUL2EC & " " & "€"
End If
If ComboBox1 = "B" Then
TextBox.Value = VBRI1C + VBRI2C + VBRI5C + VBRI10C + VBRI20C + VBRI50C + VBRI1E + VBRI2E + VBRI2EC & " " & "€"
End If
Peut être un cerveau moins embrumé que le mieux serait plus efficace...
Merci,
J.