View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave Peterson
 
Posts: n/a
Default Autofilter - on select columns

I bet if you share the range of data you want autofiltered (include all the
columns--not just the ones that will end up with visible arrows) and share the
columns that you want to have visible arrows, then Debra can help:

For instance:
Filter C1:X1
show arrows on D F G X


rudawg wrote:

Debra,

Thanks You for the help. I could not have gotten as far as I have without
your help. Not only have you helped me here but from your website as well.
Someone here recommended a website

http://www.contextures.com

It turns out that it is yours. It was incredibly helpful. I downloaded the
sample file called "AdvFilterCity" and stole your Macro1. I made a few
changes and it works for my spreadsheet. This is remarkable because I really
know nothing of VB code. In fact I parse out the data two ways. One by
Owner and the other by Project Category. See my previous post tited: Subject:
Filterered list to new worksheet. I was able to selectively alter your macro
to work for me.

However, in the code below I don't see how to select which columns will
have the autofeature hidden.

Can you help further?

Thanks
Rudy

"Debra Dalgleish" wrote:

You can use programming to hide some of the dropdown arrows. For example:

'===========================
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
c.AutoFilter Field:=c.Column, _
Visibledropdown:=True
Case Else
c.AutoFilter Field:=c.Column, _
Visibledropdown:=False
End Select
Next
Application.ScreenUpdating = True
End Sub
'==============================

rudawg wrote:
You all might begin to wish I never found this forum. But the help truly is
appreciated.

I have created a list which naturally turned on the autofilter feature. How
can I turn off the autofilter feature for all but two of the columns?

Thanks
Rudy



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html



--

Dave Peterson