laquel de ligne je doit remplacé stp ?
celle ci Somme = Somme + Sheets(Nonglet).Cells(Cell.Row, Cell.Column) ?
donc cela donne :
Sub SomOnglets()
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Dim OngletDeb As Byte, OngletFin As Byte, Plage As Range, Somme As Single, Nonglet As Byte
On Error GoTo Fin
OngletDeb = Application.InputBox("N° de l'onglet de départ", Type:=1)
Do
OngletFin = Application.InputBox("N° de l'onglet de fin", Type:=1)
Loop While OngletFin < OngletDeb
Application.ScreenUpdating = True
Set Plage = Application.InputBox("Sélectionnez une cellule ou une plage :", Type:=8)
Application.ScreenUpdating = False
For Each Cell In Plage
Somme = 0
For Nonglet = OngletDeb To OngletFin
If Sheets("Totaux mensuels").Range("B7") = Sheets(Nonglet).Range("B7") Then
Somme = Somme + Sheets(Nonglet).Cells(Cell.Row, Cell.Column)
End If
Next Nonglet
Cell.Value = Somme
Next
Fin:
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
End Sub