salut Gwen
excuse,pas vu que la taille du fichier dépassait 50k
clic droit souris sur onglet et visualiser code
à mettre dans le code de la feuille S45 et modèle
Private Sub Worksheet_Change(ByVal Target As Range)
Dim PlgCumul, c As String, Mot As String, L As Byte, LL As Byte
Application.Calculation = xlCalculationManual
c = Range('C5').End(xlToRight).Address
Mot = Range(c).Value
L = Sheets('Cumul').Range('A2').End(xlDown).Row
If Sheets('Cumul').Range('A' & L).Value = Mot Then Exit Sub
PlgCumul = Sheets('Cumul').Range('A5:A' & L)
For LL = 1 To UBound(PlgCumul, 1)
If PlgCumul(LL, 1) = Mot Then Mot = ''
Next LL
If Mot = '' Then
Exit Sub
Else: Feuil4.Range('A' & L).Offset(1, 0).Value = Mot
End If
Application.Calculation = xlCalculationAutomatic
End Sub
à mettre dans le code de la feuille cumuk
Private Sub Worksheet_Activate()
Dim Sh As Worksheet, PlgSh, PlgCumul
Dim L As Byte, c As Byte
Application.Calculation = xlCalculationManual
L = Feuil4.Range('A2').End(xlDown).Row
PlgCumul = Feuil4.Range('A5:A' & L)
For Each Sh In Worksheets
If Left(Sh.Name, 1) = 's' Then
PlgSh = Sh.Range('C5:K6')
For c = 1 To UBound(PlgSh, 2)
For L = 1 To UBound(PlgCumul, 1)
If PlgSh(1, c) = '' Then Exit For
If PlgCumul(L, 1) = PlgSh(1, c) And PlgSh(2, c) <> '' Then
Feuil4.Range('B' & L).Offset(4, 0).Value = PlgSh(2, c)
End If
Next L
Next c
End If
Next Sh
Application.Calculation = xlCalculationAutomatic
End Sub
à bientôt