Boa tarde!!
Talvez uma outra forma
Sub AleVBA_9911()
Dim ws As Worksheet, wsMaster As Worksheet, LR As Long, NR&
Application.ScreenUpdating = 0
Set wsMaster = Sheets("Tarefas")
wsMaster.UsedRange.Offset(0).ClearContents
For Each ws In Worksheets
If ws.Name <> wsMaster.Name Then
With ws
.AutoFilterMode = False
.Rows(10).AutoFilter 10, "=1", xlOr, "=2"
LR = .Cells.Find("*", , , , xlByRows, xlPrevious).Row
If LR > 1 Then
.Range("A11:K" & LR).Copy
NR = wsMaster.Cells(.Rows.Count, 1).End(xlUp).Row + 1
wsMaster.Range("A" & NR).PasteSpecial xlValues
End If
.Rows(10).AutoFilter
End With
End If
Next ws
Application.ScreenUpdating = True
End Sub
Obs: a guia Tarefas, não pode conter células mescladas!
Att
Existem mil maneiras de preparar Neston. Invente a sua!
http://www.youtube.com/ExpressoExcel
Postado : 13/12/2013 1:28 pm