Boa tarde!!
Tente algo asim..
Sub AleVBA_19248()
Dim lastrow As Long
lastrow = Cells(Rows.Count, "A").End(xlUp).Row
'Application.ScreenUpdating = False
With Worksheets("dados")
.Range("E:E").Clear
.Range("E2").Formula = "=IFERROR(MATCH(LEFT(A2,11),criterios!$A$2:$A$14,0),0)"
.Range("E2").AutoFill Destination:=.Range("E2:E" & lastrow)
.Range("E2:E" & lastrow).Value = .Range("E2:E" & lastrow).Value
[E1].Value = "AleVBA"
.AutoFilterMode = False
.Range("E1:E" & .Cells(Rows.Count, 5).End(xlUp).Row).AutoFilter 1, ">=1", xlWhole
.Range(.Cells(2, 1), .Cells(.Cells(Rows.Count, 1).End(xlUp).Row, "D")).SpecialCells(12).Copy Sheets("rasultado").Range("A2")
.AutoFilterMode = False
End With
' Application.ScreenUpdating = True
End Sub
Não deu tempo de testar
Att
Existem mil maneiras de preparar Neston. Invente a sua!
http://www.youtube.com/ExpressoExcel
Postado : 22/02/2016 11:30 am