ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Selective Autofilter Application (https://www.excelbanter.com/excel-discussion-misc-queries/111138-selective-autofilter-application.html)

Maurice

Selective Autofilter Application
 
When I apply the autofilter funtion, it does so accross all existing columns
of my worksheet. Is it possible to apply this functionality to only a few
selected columns, and how do I go about it ?

Kind regards

JR

Selective Autofilter Application
 
....just highlight the columns that you want to apply the autofilter to, then
select autofilter.

"Maurice" wrote:

When I apply the autofilter funtion, it does so accross all existing columns
of my worksheet. Is it possible to apply this functionality to only a few
selected columns, and how do I go about it ?

Kind regards


Fred Smith

Selective Autofilter Application
 
Yes. Select the columns first, then apply Autofilter.

--
Regards,
Fred


"Maurice" wrote in message
...
When I apply the autofilter funtion, it does so accross all existing columns
of my worksheet. Is it possible to apply this functionality to only a few
selected columns, and how do I go about it ?

Kind regards




Maurice

Selective Autofilter Application
 
Hi JR,

I actually tried that before the post, but it didn't work for some reason.
When selecting the 2nd column, it simply undoes the first. Also, selecting a
few via Ctrl, also won't allow you. What do you think is potting ? I run
Excel 2002.

"JR" wrote:

...just highlight the columns that you want to apply the autofilter to, then
select autofilter.

"Maurice" wrote:

When I apply the autofilter funtion, it does so accross all existing columns
of my worksheet. Is it possible to apply this functionality to only a few
selected columns, and how do I go about it ?

Kind regards


Maurice

Selective Autofilter Application
 
Fred,

As per my reply to JR, your suggestion does not work either. That's what I
find so strange. Would have thougt this to be rather "elementary" stuff ?

"Fred Smith" wrote:

Yes. Select the columns first, then apply Autofilter.

--
Regards,
Fred


"Maurice" wrote in message
...
When I apply the autofilter funtion, it does so accross all existing columns
of my worksheet. Is it possible to apply this functionality to only a few
selected columns, and how do I go about it ?

Kind regards





Debra Dalgleish

Selective Autofilter Application
 
You can apply an AutoFilter to the entire table, then hide some arrows
with programming. For example, the following code leaves arrows visible
only on columns 2, 3 and 7.

'======================
Sub HideSomeArrows()
'hide some autofilter arrows
Dim c As Range
Dim i As Integer
i = Cells(1, 1).End(xlToRight).Column
Application.ScreenUpdating = False
For Each c In Range(Cells(1, 1), Cells(1, i))
Select Case c.Column
Case 2, 3, 7
c.AutoFilter Field:=c.Column, _
Visibledropdown:=True
Case Else
c.AutoFilter Field:=c.Column, _
Visibledropdown:=False
End Select
Next
Application.ScreenUpdating = True
End Sub
'====================

Maurice wrote:
When I apply the autofilter funtion, it does so accross all existing columns
of my worksheet. Is it possible to apply this functionality to only a few
selected columns, and how do I go about it ?

Kind regards



--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html


Maurice

Selective Autofilter Application
 
Hi Debra,

Finally, some advice that actually works !. Thank you ever so kindly, it is
much apreciated. In the absense of any easier method, I will simply continue
to use the macro you provided.

PS. I still haven't been able to determine why the other advise given, did
not work. This seems such a simple function, or perhaps not ? Is there
something wrong my end, or is it a case that MS Excel simply do not possess
the required functionality. Surely I can't be the first person to have this
particular need.

Anyway, many thanks again for resolving my problem. Wish there was a
resource where I could learn more about writing a macro.

Kind regards
Maurice

"Debra Dalgleish" wrote:

You can apply an AutoFilter to the entire table, then hide some arrows
with programming. For example, the following code leaves arrows visible
only on columns 2, 3 and 7.

'======================
Sub HideSomeArrows()
'hide some autofilter arrows
Dim c As Range
Dim i As Integer
i = Cells(1, 1).End(xlToRight).Column
Application.ScreenUpdating = False
For Each c In Range(Cells(1, 1), Cells(1, i))
Select Case c.Column
Case 2, 3, 7
c.AutoFilter Field:=c.Column, _
Visibledropdown:=True
Case Else
c.AutoFilter Field:=c.Column, _
Visibledropdown:=False
End Select
Next
Application.ScreenUpdating = True
End Sub
'====================

Maurice wrote:
When I apply the autofilter funtion, it does so accross all existing columns
of my worksheet. Is it possible to apply this functionality to only a few
selected columns, and how do I go about it ?

Kind regards



--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html



Debra Dalgleish

Selective Autofilter Application
 
You're welcome, and thanks for letting me know that it worked for you.

The other suggestions should work for adjacent columns, but not for
non-adjacent columns.

David McRitchie's site has an introduction to macros:
http://www.mvps.org/dmcritchie/excel/getstarted.htm


Maurice wrote:
Hi Debra,

Finally, some advice that actually works !. Thank you ever so kindly, it is
much apreciated. In the absense of any easier method, I will simply continue
to use the macro you provided.

PS. I still haven't been able to determine why the other advise given, did
not work. This seems such a simple function, or perhaps not ? Is there
something wrong my end, or is it a case that MS Excel simply do not possess
the required functionality. Surely I can't be the first person to have this
particular need.

Anyway, many thanks again for resolving my problem. Wish there was a
resource where I could learn more about writing a macro.

Kind regards
Maurice

"Debra Dalgleish" wrote:


You can apply an AutoFilter to the entire table, then hide some arrows
with programming. For example, the following code leaves arrows visible
only on columns 2, 3 and 7.

'======================
Sub HideSomeArrows()
'hide some autofilter arrows
Dim c As Range
Dim i As Integer
i = Cells(1, 1).End(xlToRight).Column
Application.ScreenUpdating = False
For Each c In Range(Cells(1, 1), Cells(1, i))
Select Case c.Column
Case 2, 3, 7
c.AutoFilter Field:=c.Column, _
Visibledropdown:=True
Case Else
c.AutoFilter Field:=c.Column, _
Visibledropdown:=False
End Select
Next
Application.ScreenUpdating = True
End Sub
'====================

Maurice wrote:

When I apply the autofilter funtion, it does so accross all existing columns
of my worksheet. Is it possible to apply this functionality to only a few
selected columns, and how do I go about it ?

Kind regards



--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html





--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html



All times are GMT +1. The time now is 09:53 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com