Re : transfert de données d'une feuille sur une autre si ...
Bonjour,
ha j'ai trouvé, et après qu'est ce que je fais ?
j'ai le machin ci-dessous mais je ne sais pas quoi en faire ! 😱
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
    Dim Ligne
    With Sheets("Feuil12")
        If IsNumeric(Left(Sh.Name, 1)) And Len(Sh.Name) = 2 Then
            If Target.Column > 2 Then
                Application.EnableEvents = False
                For Each c In .Range(.[B2], .Cells(.Rows.Count, 2).End(xlUp))
                    If c = Sh.Cells(Target.Row, 1) And c.Offset(, 1) = Sh.Cells(Target.Row, 2) Then
                        Ligne = c.Row
                        Exit For
                    Else
                        Ligne = 0
                    End If
                Next c
                If Ligne = 0 Then
                    Ligne = Application.Max(3, .Cells(.Rows.Count, 1).End(xlUp).Row + 1)
                End If
                    .Cells(Ligne, 1) = Sh.Name
                    Sh.Cells(Target.Row, 1).Resize(, 255).Copy .Cells(Ligne, 2)
                    .Cells(Ligne, 2).Copy
                    .Cells(Ligne, 1).PasteSpecial xlPasteFormats
                    Application.CutCopyMode = False
                Application.EnableEvents = True
            End If
        End If
    End With
End Sub
Sub test()
Application.EnableEvents = True
End Sub