Excel2013:memorisation de donnees

Bonjour,

J'ai un petit probleme pour memoriser des donnees jour par jour

J'envoie un fichier joint pour me faire comprendre.

D'avance MERCI

Cordialement

18memorisation.rar (8.21 Ko)

Bonjour,

Une première proposition à étudier.

Cdlt.

16memorisation.xlsm (23.49 Ko)
Option Explicit

Dim lo As ListObject

Private Sub cmdReset_Click()

    Set lo = Me.ListObjects(1)
    With lo
        If Not .DataBodyRange Is Nothing Then .DataBodyRange.Delete
    End With

    Set lo = Nothing

End Sub

Private Sub Worksheet_Change(ByVal Target As Range)
Dim lr As ListRow

    If Target.Count > 1 Then Exit Sub
    If Not Intersect(Target, Range([A2], [B2])) Is Nothing Then
        If Application.CountA([A2:B2]) <> 2 Then
            Exit Sub
        Else
            Application.EnableEvents = False
            Set lo = Me.ListObjects(1)
            If lo.InsertRowRange Is Nothing Then
                Set lr = lo.ListRows.Add
                With lr.Range
                    .Cells(1, 1) = [A2]: .Cells(1, 2) = [B2]
                End With
            Else
                With lo.InsertRowRange
                    .Cells(1) = [A2]: .Cells(2) = [B2]
                End With
            End If
            [A2:B2].ClearContents
        End If
    End If

    Application.EnableEvents = True

    Set lr = Nothing: Set lo = Nothing

End Sub

Bonjour jean-eric et merci

j'ai reussi a trouver ce qu'il me fallait par l'intermediaire d'un collegue

je vous envoie le fichier avec les commentaires

merci encore

cordialement

Re,

Tu aurais pu tout de même regarder la proposition.

Cdlt.

Rechercher des sujets similaires à "excel2013 memorisation donnees"