Boa tarde!!
Eu não sei se entendi....
Caso queira contar a origem
MsgBox "Foram copiadas " & Sheets("Transf").Range("A1").End(xlDown).Row & " Linhas"
Mude a guia caso queira contar apenas o reulstado.
###########
Sub Filter_Coluna()
Dim rCrit As Range
Dim aCrit
'With Sheets("Dados")
'.Range("A2:D50000").ClearContents
'End With
Application.ScreenUpdating = 0
With Sheets("Plan3")
Set rCrit = .Range("A2", .Range("A" & .Rows.Count).End(xlUp))
aCrit = Split(Join(Application.Transpose(rCrit), Chr(1)), Chr(1))
End With
With Sheets("Transf")
.Range("$B$1:$B$50000").AutoFilter Field:=1, Criteria1:=aCrit, Operator:=xlFilterValues
.Activate
.Range(.Cells(2, "A"), .Range("C" & Rows.Count).End(xlUp)).Copy Destination:=Sheets("Dados").Range("A" & Rows.Count).End(xlUp).Offset(1)
'.Range(.Cells(2, "A"), .Cells(10000, "C")).Copy Destination:=Sheets("Dados").Range("A" & Rows.Count).End(xlUp).Offset(1)
.ShowAllData
End With
Call Duplic_AleVBA_9890
Application.ScreenUpdating = 1
MsgBox "Foram copiadas " & Sheets("Transf").Range("A1").End(xlDown).Row & " Linhas"
End Sub
Obs:Por favor, click na mãozinha
Att
Existem mil maneiras de preparar Neston. Invente a sua!
http://www.youtube.com/ExpressoExcel
Postado : 11/12/2013 1:35 pm