Re : transposition automatique
Voici deux macros inverses, qui s'ajustent à la plage effectivement utilisée des deux feuilles...
Ce que je cherche à faire maintenant c'est à automatiser le lancement...
Sub PArOutils()
'
' Transposition Macro
' Macro enregistrée le 18/09/2007 par a17188
'
' Touche de raccourci du clavier: Ctrl+Maj+T
'
Sheets("Par Caractéristique").Select
Range("A1").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Sheets("Par Outil").Select
Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Columns("A:A").EntireColumn.AutoFit
Columns("B:B").Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.ColumnWidth = 60
Application.CutCopyMode = False
With Selection
.WrapText = True
.Orientation = 0
.AddIndent = False
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
ActiveWindow.SmallScroll Down:=-15
End Sub
Sub PArCaract()
'
' Transposition Macro
' Macro enregistrée le 18/09/2007 par a17188
'
' Touche de raccourci du clavier:
'
Sheets("Par Outil").Select
Range("A1").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Sheets("Par Caractéristique").Select
Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Columns("A:A").Select
Range(Selection, Selection.End(xlToRight)).Select
With Selection
.WrapText = False
.Orientation = 0
.AddIndent = False
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Selection.EntireColumn.AutoFit
Application.CutCopyMode = False
ActiveWindow.SmallScroll Down:=-15
End Sub