+ Reply to Thread
Results 1 to 2 of 2

Apply an autofilter to Row 6 across multiple worksheets

  1. #1
    Forum Contributor
    Join Date
    11-05-2014
    Location
    Charlotte
    MS-Off Ver
    2013
    Posts
    181

    Apply an autofilter to Row 6 across multiple worksheets

    Hi All,

    I have a workbook with multiple sheets, and I need to apply a filter to Row 6 in each one of these sheets. Does anyone know of a code that I coud use to execute this?

    The VBA code I used to use when I needed the very first column filtered was the following. I'm not sure if the one below can just be tweaked to select the 6th row instead of row 1.

    Sub autofilter()
    Application.ScreenUpdating = False
    For Each ws In ActiveWorkbook.Worksheets
    ws.Activate
    ActiveSheet.UsedRange.Select
    Selection.autofilter
    Next ws
    Application.ScreenUpdating = True

    End Sub

  2. #2
    Forum Contributor
    Join Date
    11-05-2014
    Location
    Charlotte
    MS-Off Ver
    2013
    Posts
    181

    Re: Apply an autofilter to Row 6 across multiple worksheets

    I figured it out- hope this helps any viewers of this thread out there!

    Sub autofilter()
    Application.ScreenUpdating = False
    For Each ws In ActiveWorkbook.Worksheets
    ws.Activate
    ActiveSheet.Range("A6").Select
    Selection.autofilter
    Next ws
    Application.ScreenUpdating = True

    End Sub

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How to apply multiple Range to refer multiple worksheets in VBA
    By DURGESH88 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-18-2015, 01:32 AM
  2. [SOLVED] Apply Module to Multiple Worksheets
    By Celex005 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-14-2015, 11:59 AM
  3. How to apply multiple Range to refer multiple worksheets in VBA
    By DURGESH88 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-14-2015, 06:30 AM
  4. Apply filter across multiple worksheets
    By okkoos in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-31-2012, 02:37 AM
  5. Need to apply VBA code to multiple Worksheets
    By parteegolfer in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-12-2006, 04:43 PM

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