+ Reply to Thread
Results 1 to 8 of 8

Macro to filter the same column regardless of changes

  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?

    Please Login or Register  to view this content.
    Last edited by Barking_Mad; 07-21-2010 at 08:17 AM.

  2. #2
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Macro to filter the same column regardless of changes

    Hi Barking_Mad,
    Possibly if you know the field title eg if the coulmn title is "Two"
    Please Login or Register  to view this content.
    Last edited by pike; 07-16-2010 at 07:33 AM.
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

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

    Re: Macro to filter the same column regardless of changes

    Hi Pike,

    Thanks, but im having trouble getting the compiler to accept the code....im crap at VBA so please excuse..It's giving me a synstax error

    Please Login or Register  to view this content.
    Additionally, should i delete

    Please Login or Register  to view this content.
    from the original code?

  4. #4
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Macro to filter the same column regardless of changes

    Hi Barking_Mad
    Could you attach the workbook?

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

    Re: Macro to filter the same column regardless of changes

    Here you go, ive taken bits and pieces of sensitive info out, but the column i want to filter is the ANNOTATIONS one on the end of the sheet, namely anything with LATE in the column of cells..
    Attached Files Attached Files

  6. #6
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Macro to filter the same column regardless of changes

    Dude try this...

    Please Login or Register  to view this content.
    Last edited by pike; 07-16-2010 at 08:07 PM. Reason: xcount added

  7. #7
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Macro to filter the same column regardless of changes

    Barkingmad
    also removed the merged cells
    Attached Files Attached Files

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

    Re: Macro to filter the same column regardless of changes

    Thanks Pike

+ 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