I was wandering if there is a way to set a filter for multiple columns. Say I wanted to skip column A, filter B,C,D. Skip columns E,F and pick up again on G thru J. Those aren't the exact columns I'm needing, just as an example.
I was wandering if there is a way to set a filter for multiple columns. Say I wanted to skip column A, filter B,C,D. Skip columns E,F and pick up again on G thru J. Those aren't the exact columns I'm needing, just as an example.
Good morning greenfox74.
Yes. No. Well, sort of.
If you want to use autofilter only on some columns, they need to be contiguous. So highlight from A1 - C1 and go to Data > Filter.
Beyond that, you could set up the filter on all columns and use VBA to hide the filter arrow.
HTHPlease Login or Register to view this content.
DominicB
Hello and thank you for the reply dominicb!
I actually have quite a few columns I want to hide that arrow tab in and to be honest, I don't know how to make this work for all the columns I want to hide it in.
I have columns A thru BK right now that are filtered. There are multiple columns I want to hide. I did find a bit of code that worked, but I can't change it to make it suit what I need.
Here is the code.
Sub HideSpecifiedArrows()
'hides arrows in specified columns
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 1, 3, 4
c.AutoFilter Field:=c.Column, _
Visibledropdown:=False
Case Else
c.AutoFilter Field:=c.Column, _
Visibledropdown:=True
End Select
Next
Application.ScreenUpdating = True
End Sub
Does anyone know what I need to change in this other than Case 1, 3, 4, ?, ?, ? etc. to make this work?
Thank you very much!!!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks