welshraz
New Member
- Joined
- Apr 29, 2016
- Messages
- 39
- Office Version
- 365
- Platform
- Windows
Morning!
Hope someone can help me tweak this macro a little. It works for what I need, i.e. combining the data from 10 or so worksheets into a master tab, and ignoring a selection of others. What I need it to also do is ignore any filtering on the tabs it compiles, or remove the filtering before copying.
Any help or guidance greatly received.
Hope someone can help me tweak this macro a little. It works for what I need, i.e. combining the data from 10 or so worksheets into a master tab, and ignoring a selection of others. What I need it to also do is ignore any filtering on the tabs it compiles, or remove the filtering before copying.
VBA Code:
Sub combinedata()
Dim var As Integer
Dim Sh As Worksheet
var = 0
For Each Sh In Worksheets
If Sh.Name = "Master" Then
var = 1
Exit For
End If
Next Sh
For Each Sh In Worksheets
If Sh.Name <> ActiveSheet.Name And Sh.Name <> "Landing Page" And Sh.Name <> "Build Completes" Then
With Sh
.Range("A3:AC" & .Range("A" & Rows.Count).End(xlUp).Row).Copy _
Range("A" & Range("A" & Rows.Count).End(xlUp).Row + 1)
End With
End If
Next Sh
ActiveWindow.DisplayGridlines = False
Range("A3").CurrentRegion.Select
End Sub
Any help or guidance greatly received.