Après macro, les dates changent de format... mais pas toutes

Bonjour,

Je reviens sur ce forum après consultations des différents post sans avoir trouvé réponse à ma question:

après réalisation d'une macro, j'ai une colonne A de dates dont certaines ont été changées en terme de format (de jj/mm/aaa passent à mm/jj/aaa: cellules en jaune). Plus possible de travailler avec ces cellules modifiées.

capture1

J'aimerais comprendre la raison de ces modifications intempestives.

En vous remercaint pour votre précieuse collaboration.

Titty

Bonjour

Restent à voir l'écriture de ton code pour comprendre ton format dans celui-ci et, si possible le fichier.

Cordialement

Merci Amadeus,

Voici un extrait de mon code:

Option Explicit

Dim tablo, tabloR(), dico As Object
Dim i&, j&, k&, col&, nbMax&, nbcolR&

Sub NllePresentation()
Application.ScreenUpdating = False 'Empeche le rafraichissement de l'écran

     tablo = Range("A1").CurrentRegion
     Set dico = CreateObject("Scripting.Dictionary")

    'On compte les Numéros différents
    nbMax = 0
    For i = 2 To UBound(tablo, 1)
        If dico.exists(tablo(i, 5)) Then
            dico(tablo(i, 5)) = dico(tablo(i, 5)) + 1
        Else
            dico(tablo(i, 5)) = 1
        End If
        If nbMax < dico(tablo(i, 5)) Then
            nbMax = dico(tablo(i, 5))
        End If
    Next i

    k = 0
    For i = 2 To UBound(tablo, 1)
        If tablo(i, 5) = tablo(i - 1, 5) Then
            For col = 16 To 11 + 3 * nbMax Step 3
                If tabloR(col, k) = "" Then
                   Exit For
                End If
            Next col
            tabloR(col, k) = tablo(i, 16)
            tabloR(col + 1, k) = tablo(i, 17)
            tabloR(col + 2, k) = tablo(i, 18)
        Else
            ReDim Preserve tabloR(1 To 14 + 3 * nbMax, 1 To k + 1)
            For j = 1 To 18
                tabloR(j, 1 + k) = tablo(i, j)
            Next j
            k = k + 1
        End If
    Next i

    With Sheets("1er vols rotations Résultat")
        .Range("A1").CurrentRegion.Clear
        Range("A1:O1").Copy .Range("A1")
        Range("P1:AA1").Copy .Range(.Cells(1, 16), .Cells(1, 12 + 1 * nbMax))

        .Range("A2").Resize(UBound(tabloR, 2), UBound(tabloR, 1)) = _
        Application.Transpose(tabloR)
        .Activate
    End With
    Erase tabloR
Range("A1").Select

End Sub

Et le fichier joint.

Merci pour ton aide

Titty

Une petite idée? personne...?

Rechercher des sujets similaires à "macro dates changent format pas toutes"