Bonjour
Je voudrai compter le nombre de pair et d'impair dans Plage_2
Cells(i, 5).offset(0,-2) = 100
cela ne fonctionne pas, pourquoi
Debug.Print Cells(i, 5).Value Mod 2 donne o ou i
merci
""""""""
Set Plage_2 = Range(Cells(3, 5), Cells(NB + 1, 5))
If Cells(i, 5).Value Mod 2 = 0 Then Cells(i, 5).Interior.ColorIndex = 22
If Cells(i, 5).Value Mod 2 <> 0 Then Cells(i, 5).Interior.ColorIndex = 23
Tab_Num_Sorties(4, 1) = Application.WorksheetFunction.CountIf(Plage_2, Cells(i, 5) Mod 2 = 0)
Debug.Print Cells(i, 5).Value Mod 2