Sub Filtrer()
Dim plage As Range, vForm
Set plage = Range("A1:AS1248"): vForm = Array("=SUBTOTAL(3,AR:AR)-1", "=SUBTOTAL(9,E:E)")
Set plage = Range("a1:ar1248")
plage.AutoFilter Field:=ActiveCell.Column, Criteria1:=">-24", Operator:=xlAnd
With Range("CI2:CI3")
.Formula = Application.Transpose(vForm)
.Value = .Value
With .Offset(, -1)
.Formula = Application.Transpose(vForm)
.Value = .Value
With .Offset(, 1)
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
End With
End With
End With
End Sub
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Application.ScreenUpdating = False
Call Filtrer
Cancel = True
End Sub
VBA