Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 789
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default on which column is the filter active?

GREAT!!! thanks!

wrote in message
ups.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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default 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

" 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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Open excel with a filter active an a certain value Elly Driesen-Schepens Excel Discussion (Misc queries) 1 April 5th 07 05:24 PM
Active Cell in Auto Filter Michael Link Excel Discussion (Misc queries) 1 August 1st 06 04:27 PM
Active Cell to be used as filter... Darin Kramer Excel Programming 2 July 21st 06 03:18 PM
Filter range of only active cells??? malik641 Excel Worksheet Functions 3 June 17th 05 06:54 PM
how can I return the active row and active column? Greg Excel Programming 0 February 3rd 05 07:38 PM


All times are GMT +1. The time now is 10:41 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"