1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| Sub macro1()
With Sheets("MSPTT")
' Je déclare la plage variable de l'onglet MSPTT
Set mspui = Range([K1], [K65635].End(xlUp))
End With
' Je selectionne la cellule E4 de la feuille TAUX et prend la valeur retournée par la fonction CountIF
Sheets("Taux MSP").Range("E4") = WorksheetFunction.CountIf(mspui, "LOIRE")
' Sheets("Taux MSP").Range("E5") = WorksheetFunction.CountIf(mspui, "PARIS")
' Sheets("Taux MSP").Range("E6") = WorksheetFunction.CountIf(mspui, "LYON")
' Sheets("Taux MSP").Range("E7") = WorksheetFunction.CountIf(mspui, "MARSEILLE PROVENCE")
' Sheets("Taux MSP").Range("E8") = WorksheetFunction.CountIf(mspui, "NICE")
' Sheets("Taux MSP").Range("E9") = WorksheetFunction.CountIf(mspui, "RENNES")
End Sub |
Partager