+ Reply to Thread
Results 1 to 7 of 7

AutoFiltering Multiple Sheets?

Hybrid View

  1. #1
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,524

    Re: AutoFiltering Multiple Sheets?

    Quote Originally Posted by SargeAbernathy View Post
    What if I have a sheet I don't want to be affected by AutoFilter?
    This will work

    Sub FilterAllSheets()
        Dim WS As Object
        For Each WS In Worksheets
            If WS.Name <> "MySheet" Then
                With WS.Range("A1")
                    .AutoFilter
                    .Sort Key1:=WS.Range("A1"), Order1:=xlAscending, Header:= _
                          xlYes, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
                          DataOption1:=xlSortNormal
                End With
            End If
        Next WS
    End Sub

  2. #2
    Registered User
    Join Date
    02-24-2009
    Location
    AccountKiller, AccountKiller
    MS-Off Ver
    AccountKiller
    Posts
    3

    Re: AutoFiltering Multiple Sheets?

    Neither of those codes work. I had put them in the VBA as is, but when I go to Sheet 1 and sort by Column A, all the information in the other sheets still will not sort with the corresponding rows.

    Does anyone else have an idea?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1