Re : Macro
G mis en pièce jointe ma base de données et voici ma macro (je ne pouvais pas laisser le fichier excel avec la macr car il etait trop volumineux). Donc mon problème c que cette macro ne prend en aucun compte les évolutions faites sur la base de données et je ne comprend pas pourquoi!
merci
Sub Macro1()
'
' Macro1 Macro
' Macro enregistrée le 13/06/2007 par Informatique
'
' Touche de raccourci du clavier: Ctrl+m
'
Range("A1😛846").Select
Range("D6").Activate
Selection.Copy
Sheets("Feuil1").Select
ActiveSheet.Paste
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 6
Range("A1😛846").Select
Range("H15").Activate
Application.CutCopyMode = False
Range("A1😛845").Sort Key1:=Range("P2"), Order1:=xlAscending, Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 6
Range("Q1").Select
ActiveCell.FormulaR1C1 = "Compteur"
Range("Q2").Select
ActiveCell.FormulaR1C1 = "=COUNTIF(RC[-1],""<>""&R[-1]C[-1])"
Range("Q2").Select
Selection.AutoFill Destination:=Range("Q2:Q846"), Type:=xlFillDefault
Range("Q2:Q846").Select
Range("N854").Select
ActiveCell.FormulaR1C1 = "=SUM(C[3])-1"
Range("M854").Select
ActiveCell.FormulaR1C1 = "Nombre total:"
Range("M854:N854").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Range("Q852").Select
ActiveWorkbook.Save
End Sub