PDA

View Full Version : reformuler un tableau ce forme dans rapport Excel



activation01
12-04-2017, 09:26 AM
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

jolivanes
12-04-2017, 02:02 PM
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

activation01
12-07-2017, 08:36 AM
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 ,

jolivanes
12-07-2017, 09:16 AM
Good to hear and thanks for letting us know that all is well.
Good Luck