+ Reply to Thread
Results 1 to 4 of 4

on which column is the filter active?

  1. #1
    Alfonso
    Guest

    on which column is the filter active?

    How do I identify the column on which a filter is active in an Excel sheet?

    Alfonso



  2. #2
    paul.robinson@it-tallaght.ie
    Guest

    Re: on which column is the filter active?

    Hi
    Try this:
    Sub tester()
    Dim myFilter As Filter
    Dim Filtercolumn As Integer

    Filtercolumn = 0
    With Worksheets(1)
    If .AutoFilterMode Then
    For Each myFilter In .AutoFilter.Filters
    Filtercolumn = Filtercolumn + 1
    If myFilter.On Then
    MsgBox Filtercolumn
    End If
    Next myFilter
    End If
    End With
    End Sub

    regards
    Paul
    Alfonso wrote:
    > How do I identify the column on which a filter is active in an Excel sheet?
    >
    > Alfonso



  3. #3
    Alfonso
    Guest

    Re: on which column is the filter active?

    GREAT!!! thanks!

    <paul.robinson@it-tallaght.ie> wrote in message
    news:1154601920.610360.92880@i42g2000cwa.googlegroups.com...
    > Hi
    > Try this:
    > Sub tester()
    > Dim myFilter As Filter
    > Dim Filtercolumn As Integer
    >
    > Filtercolumn = 0
    > With Worksheets(1)
    > If .AutoFilterMode Then
    > For Each myFilter In .AutoFilter.Filters
    > Filtercolumn = Filtercolumn + 1
    > If myFilter.On Then
    > MsgBox Filtercolumn
    > End If
    > Next myFilter
    > End If
    > End With
    > End Sub
    >
    > regards
    > Paul
    > Alfonso wrote:
    >> How do I identify the column on which a filter is active in an Excel
    >> sheet?
    >>
    >> Alfonso

    >




  4. #4
    MakeLei
    Guest

    Re: on which column is the filter active?

    Hi,
    How could I use the value in the filter heading cell instead of Filtercolumn
    number?

    BR
    Makelei

    "paul.robinson@it-tallaght.ie" wrote:

    > Hi
    > Try this:
    > Sub tester()
    > Dim myFilter As Filter
    > Dim Filtercolumn As Integer
    >
    > Filtercolumn = 0
    > With Worksheets(1)
    > If .AutoFilterMode Then
    > For Each myFilter In .AutoFilter.Filters
    > Filtercolumn = Filtercolumn + 1
    > If myFilter.On Then
    > MsgBox Filtercolumn
    > End If
    > Next myFilter
    > End If
    > End With
    > End Sub
    >
    > regards
    > Paul
    > Alfonso wrote:
    > > How do I identify the column on which a filter is active in an Excel sheet?
    > >
    > > Alfonso

    >
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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