Consulting

Results 1 to 4 of 4

Thread: reformuler un tableau ce forme dans rapport Excel

  1. #1
    VBAX Newbie
    Joined
    Dec 2017
    Location
    london
    Posts
    4

    reformuler un tableau ce forme dans rapport Excel

    Bonjour,
    Je cherche de reformuler un tableau ce forme dans rapport Excel avec deux colonnes (Colonne concaténation et colonne statut).
    En PJ le tableau et le résultat a droit que je cherche. Merci pour votre support & Help

    Produit/Code Barre Code Barre 1 Code Barre 2 Code Barre 3 Code Barre 4
    Produit1 Demander pas encore pas encore pas encore
    Produit2 pas encore Demander Demander pas encore
    Produit3 pas encore Demander pas encore pas encore

    Resultat
    concaténation Statut
    Produit1/Code Barre 1 Demander
    Produit1/Code Barre 2 pas encore
    Produit1/Code Barre 3 pas encore
    Produit1/Code Barre 4 pas encore
    Produit2/Code Barre 1 pas encore
    Produit2/Code Barre 2 Demander
    Produit2/Code Barre 3 Demander
    Produit2/Code Barre 4 pas encore
    Produit3/Code Barre 1 pas encore
    Produit3/Code Barre 2 Demander
    Produit3/Code Barre 3 pas encore
    Produit3/Code Barre 4 pas encore
    Attached Files Attached Files

  2. #2
    If you don't mind my English, after all, it is an English language site, you could try this.
    2 And 3 columns to the right of the last used column need to be free to be used for the result.
    Sub Pour_Le_Francais()
    Dim lr As Long, lc As Long, j As Long, i As Long
    lr = Cells(Rows.Count, 1).End(xlUp).Row
    lc = Cells(1, Columns.Count).End(xlToLeft).Column
        For j = 2 To lr
            For i = 2 To lc
                With Cells(Cells(Rows.Count, lc + 2).End(xlUp).Row, lc + 2).Offset(1)
                    .Value = Cells(j, 1) & "/" & Cells(1, i)
                    .Offset(, 1).Value = Cells(j, i)
                End With
            Next i
        Next j
    End Sub
    Last edited by jolivanes; 12-04-2017 at 02:09 PM. Reason: extra info

  3. #3
    VBAX Newbie
    Joined
    Dec 2017
    Location
    london
    Posts
    4
    hello Jolivanes

    Great !!!, the problem was solved with your script , the matrix was correctly generated .
    , for the next Topic or help i will created it in English , thank you for your help & support ,

  4. #4
    Good to hear and thanks for letting us know that all is well.
    Good Luck

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •