Results 1 to 8 of 8

Macro to filter the same column regardless of changes

Threaded View

  1. #1
    Forum Contributor
    Join Date
    11-26-2008
    Location
    UK
    MS-Off Ver
    Using Excel 2019
    Posts
    317

    Macro to filter the same column regardless of changes

    Hi,

    I’ve recorded a macro to run a filter (as below) it and it works fine. The only problem I have is that sometimes a column will be added, or possibly removed from the sheet - meaning the filter won’t always work. Is there a way to make sure the filter always does what it does on the same column, regardless of any changes to the column's location?

    Sub late()
    '
    ' late Macro
    '
    
    '
        Range("J8:J11").Select
        Selection.AutoFilter
        ActiveSheet.Range("$B$8:$J$94").AutoFilter Field:=9, Criteria1:="=*late*", _
            Operator:=xlAnd
    End Sub
    Last edited by Barking_Mad; 07-21-2010 at 08:17 AM.

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