This code works well.
I need to get it to work with more criteria.
1. - I would like to be able to have Criteria1: = "I" or "S"
As a new piece of code I need to
2. - I would like to be able to have Criteria = "I" or "S" for Range "I" but also Criteria = "U" for Sh.Range "V".
Thanks
DK
I need to get it to work with more criteria.
1. - I would like to be able to have Criteria1: = "I" or "S"
As a new piece of code I need to
2. - I would like to be able to have Criteria = "I" or "S" for Range "I" but also Criteria = "U" for Sh.Range "V".
Code:
Sub APExtract()
Dim Sh As Worksheet
Dim lr As Long
For Each Sh In Sheets(Array("Sch6", "Sch7", "Sch8", "Sch9", "Sch10"))
If Sh.[DJ7] > 0 Then
Sh.Range("I1", Sh.Range("I" & Rows.Count).End(xlUp)).AutoFilter 1, Criteria1:="I"
lr = Sh.Range("D" & Rows.Count).End(xlUp).Row
If lr > 1 Then
Sh.Range("D6", Sh.Range("V65536").End(xlUp)).Copy
Sheet35.Range("D" & Rows.Count).End(xlUp)(2).PasteSpecial xlPasteValues
Application.CutCopyMode = False
End If
Sh.[i1].AutoFilter
End If
Next Sh
Sheet35.Select
End Sub
Thanks
DK
Last edited by a moderator: