Hello
Je cherche coller une colonne issue de ma page Home dans un tableau de comparaison sur ma page Comparison et a mettre en forme.
Pour cela, j'ai fait la macro suivante mais ça buf sur le centrage...
Je vous remercie par avance pour votre aide
Bastie,n
Sub compare1()
Dim derncol As Long
Application.ScreenUpdating = False
With Sheets("Comparison")
Sheets("Home").Range("C14:C29").Copy
derncol = .Cells(3, .Columns.Count).End(xlToLeft).Column
If derncol > 1 Then derncol = derncol + 1
.Cells(3, derncol).PasteSpecial Paste:=xlPasteValues, _
Operation:=xlNone, SkipBlanks:=False, Transpose:=False
.Range("B3:B18").Copy
.Range(.Cells(3, derncol), .Cells(18, derncol)).PasteSpecial Paste:=xlPasteFormats, _
Operation:=xlNone, SkipBlanks:=False, Transpose:=False
With .Range(.Cells(3, derncol), .Cells(18, derncol))
.HorizontalAlignment = xlHAlineCenter
.VerticalAlignment = xlVAlignCenter
End With
Columns(derncol).ColumnWidth = 50
End With
Application.ScreenUpdating = True
End Sub