Sub sommesiter()
For i = 6 To 30
j = 4 + Month("1 " & Range("C2")) 'selectionne la colonne en fonction du mois choisi'
x = Sheets("budget CMA").Range("A1").CurrentRegion.Rows.Count
col = 4 + Month("1 " & Range("C2")) 'idem j'
With Sheets("masse salariale")
If Cells(i, 2) = 641110 Then
On Error Resume Next
.Cells(i + 2, j) = WorksheetFunction.SumIf(Sheets("Budget CMA").Range("B:B"), Cells(i, 2), Sheets("Budget CMA").Range(col & ":" & col))
End If
End With
j = 0 'réinitialiser j'
Next i
End Sub