ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   filters for selective columns? (https://www.excelbanter.com/excel-discussion-misc-queries/237493-filters-selective-columns.html)

evilchrissy

filters for selective columns?
 
I have a spreadsheet with around 20 columns. i want the filter button only
on 10 of them. Easy enough if the columns are right next to eachother, i
figured out how to do that. My problem is that i only want the filter
buttons on columns a, c, e, f, h, l, and p. (these aren't the real columns,
just an example.) If it were up to me, i'd either leave all the buttons
showing, or move the columns i want filtered right next to eachother. The
problem with that is it's not up to me (I'm working on this spreadsheet for
three different supervisors and they have dictated the order they want to see
the columns in, and seeing the filter button at the top of columns they do
not want to filter annoys them.)

If I can't have the filter button on selective non-adjacent columns, is
there a way i could 'hide' the button on the columns that my bosses don't
want to see the filter button on?

Thanks in advance, any help would be appreciated.

RagDyeR

filters for selective columns?
 
It sounds as though you might be interested in "Custom Views".

Check out the Help files, and post back with any questions.
--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"evilchrissy" wrote in message
...
I have a spreadsheet with around 20 columns. i want the filter button only
on 10 of them. Easy enough if the columns are right next to eachother, i
figured out how to do that. My problem is that i only want the filter
buttons on columns a, c, e, f, h, l, and p. (these aren't the real
columns,
just an example.) If it were up to me, i'd either leave all the buttons
showing, or move the columns i want filtered right next to eachother. The
problem with that is it's not up to me (I'm working on this spreadsheet
for
three different supervisors and they have dictated the order they want to
see
the columns in, and seeing the filter button at the top of columns they do
not want to filter annoys them.)

If I can't have the filter button on selective non-adjacent columns, is
there a way i could 'hide' the button on the columns that my bosses don't
want to see the filter button on?

Thanks in advance, any help would be appreciated.




KC hotmail com>

filters for selective columns?
 
Right-click that sheet's tab and select "View Code." Paste this macro in,
modify it to represent the columns you want the filter button on, press the
green play button, delete the macro, then exit the VBA editor window. That's
it!

Sub HideSomeArrows()
'hide some autofilter arrows
Dim c As Range
Dim i As Integer
'Assumes headers begin in A1 (1,1)...change as needed in both places below
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
'These are the columns you want to show
'In this example, starting from A1, 2 is column B and 3 is column C
'So this will hide the filter button in column A and columns D to the end
Case 2, 3 'Change accordingly
c.AutoFilter Field:=c.Column, _
Visibledropdown:=True
Case Else
c.AutoFilter Field:=c.Column, _
Visibledropdown:=False
End Select
Next
Application.ScreenUpdating = True
End Sub

--
Please remember to indicate when the post is answered so others can benefit
from it later.


"evilchrissy" wrote:

I have a spreadsheet with around 20 columns. i want the filter button only
on 10 of them. Easy enough if the columns are right next to eachother, i
figured out how to do that. My problem is that i only want the filter
buttons on columns a, c, e, f, h, l, and p. (these aren't the real columns,
just an example.) If it were up to me, i'd either leave all the buttons
showing, or move the columns i want filtered right next to eachother. The
problem with that is it's not up to me (I'm working on this spreadsheet for
three different supervisors and they have dictated the order they want to see
the columns in, and seeing the filter button at the top of columns they do
not want to filter annoys them.)

If I can't have the filter button on selective non-adjacent columns, is
there a way i could 'hide' the button on the columns that my bosses don't
want to see the filter button on?

Thanks in advance, any help would be appreciated.



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

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