Boa tarde!!
Tente assim...
Sub APAGAR()
' APAGAR Macro
If WorksheetFunction.CountIf(Range("$D$2:$D$18"), "A PAGAR") > 0 Then
ActiveSheet.Range("$D$2:$D$18").AutoFilter Field:=1, Criteria1:="A PAGAR"
Exit Sub
End If
End Sub
Sub PAGO()
' PAGO Macro
If WorksheetFunction.CountIf(Range("$D$2:$D$18"), "PAGO") > 0 Then
ActiveSheet.Range("$D$2:$D$18").AutoFilter Field:=1, Criteria1:="PAGO"
Exit Sub
End If
End Sub
Sub TODOS()
' TODOS Macro
If ActiveSheet.FilterMode Then
ActiveSheet.ShowAllData
End If
End Sub
Att
Existem mil maneiras de preparar Neston. Invente a sua!
http://www.youtube.com/ExpressoExcel
Postado : 14/06/2016 9:54 am