Livin404
Well-known Member
- Joined
- Jan 7, 2019
- Messages
- 743
- Office Version
- 365
- 2019
- Platform
- Windows
Greetings, I'm using the VBA with advance auto-filter, and it seems to be working great in copying and pasting to another worksheet. The thing is I have to rerun the auto-filter macro several times slightly different to get the multiple results I need. The macro below works fine, but for each subsequent macro I would need the deficiencies pasted two rows below the last pasted range. The macro I'm using to get the first one works perfect, I just don't want the new ones replacing the first one. Thank you,
VBA Code:
Sub Date_Filter_Copy()
Dim rgData As Range, rgCriteria As Range, rgOutput As Range
Set rgData = ThisWorkbook.Worksheets("Database").Range("A4").CurrentRegion
Set rgCriteria = ThisWorkbook.Worksheets("Database").Range("A1").CurrentRegion
Set rgOutput = ThisWorkbook.Worksheets("Deficiencies").Range("A1")
rgData.AdvancedFilter xlFilterCopy, rgCriteria, rgOutput
End Sub