1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
| Private Sub Worksheet_PivotTableUpdate(ByVal Target As PivotTable)
If Target.Name = "PivotTable20" Then Macro1
End Sub
Sub Macro1()
Worksheets("StlColor").Select
'
' CopyPastMEF Macro
'Copie colle une mise en forme
'la cellule A1 donne le numéro de la dernière ligne comprenant un number = match(9^9;colonne)
'
Dim x As Integer
x = Cells(1, 1)
Range("H5:H" & x).Select
Selection.FillDown
Range("E4:E" & x).Select
Application.CutCopyMode = False
Selection.Copy
Range("H4").Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Selection.Copy
Range("F4").Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Range("E" & x + 1 & ":H1000").Select
Selection.Delete
Range("A1").Select
End Sub |
Partager