ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   remove autofilter from some columns (https://www.excelbanter.com/excel-programming/363720-remove-autofilter-some-columns.html)

Capp

remove autofilter from some columns
 
I have turned on Autofilter, but I only use one column to filter. How would
I remove or hide the other dropboxes for the rest of the row?

Your help is appreciated!

Dave Peterson

remove autofilter from some columns
 
Remove the filter and only apply it to that single column.

You can actually hide the arrows, but when the columns to be filtered are
contiguous, it doesn't make much sense to add them all, then hide some.

Capp wrote:

I have turned on Autofilter, but I only use one column to filter. How would
I remove or hide the other dropboxes for the rest of the row?

Your help is appreciated!


--

Dave Peterson

Capp

remove autofilter from some columns
 
How do I hide arrows? Or only add specific autofilters to selected columns?

"Dave Peterson" wrote:

Remove the filter and only apply it to that single column.

You can actually hide the arrows, but when the columns to be filtered are
contiguous, it doesn't make much sense to add them all, then hide some.

Capp wrote:

I have turned on Autofilter, but I only use one column to filter. How would
I remove or hide the other dropboxes for the rest of the row?

Your help is appreciated!


--

Dave Peterson


Dave Peterson

remove autofilter from some columns
 
You can use this to apply the filter to a single column:

Option Explicit
Sub testme01()
Dim wks As Worksheet
Set wks = ActiveSheet
With wks
'remove any existing filter arrows
.AutoFilterMode = False
.Range("e:e").AutoFilter
End With
End Sub

You could use:
.Range("e:G").AutoFilter
to get arrows in E:G.

If you wanted to apply filter to all the columns (say A:I) and hide some:

Option Explicit
Sub testme01()
Dim wks As Worksheet
Dim iCtr As Long
Set wks = ActiveSheet
With wks
'remove any existing filter arrows
.AutoFilterMode = False
For iCtr = 1 To 9 Step 2 'A to I
'hide arrows in A, C, E, G, I
.Range("a:I").AutoFilter field:=iCtr, visibledropdown:=False
Next iCtr
End With
End Sub



Capp wrote:

How do I hide arrows? Or only add specific autofilters to selected columns?

"Dave Peterson" wrote:

Remove the filter and only apply it to that single column.

You can actually hide the arrows, but when the columns to be filtered are
contiguous, it doesn't make much sense to add them all, then hide some.

Capp wrote:

I have turned on Autofilter, but I only use one column to filter. How would
I remove or hide the other dropboxes for the rest of the row?

Your help is appreciated!


--

Dave Peterson


--

Dave Peterson


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

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