filter question

John Caines

Well-known Member
Joined
Aug 28, 2006
Messages
1,155
Office Version
  1. 2019
Platform
  1. Windows
Hello All.
Its there any way to hide a Filter button?
I want to keep all of them on my sheet except for 1.
here's a screen shot;
0RhQV.jpg


I've searched around,, can't seem to find an answer :-(
I hope somebody can advise.
many Thanks
John Caines
 
Hi SHG!!!
many thanks....
I'm reading it now,,,,,,,

Sure something here that can do it..

Many thanks again...
Have a great day/evening/night :-)

Best regards
John Caines
 
Upvote 0
Come into a problem already SHG :-(

I just want to hide F4 in my sheet.

I've used the formula;
Code:
Sub HideArrowsRange()
'hides arrows in specified range
Dim c As Range
Dim i As Integer
Dim rng As Range
Set rng = Range("B4:J4")
i = rng.Cells(1, 1).Column - 1
Application.ScreenUpdating = False

For Each c In Range("B4:J4")
    Select Case c.Address
    Case "$F$4"
        c.AutoFilter Field:=c.Column - i, _
          Visibledropdown:=False
    Case Else
        c.AutoFilter Field:=c.Column - i, _
          Visibledropdown:=True
    End Select
Next

Application.ScreenUpdating = True
End Sub

Gone to run it and I get;'1004' Runtime error...
AnutoFilter method of Range class failed......????????????????

I click debug,, and it shows these lines of code in yellow;
Code:
        c.AutoFilter Field:=c.Column - i, _
          Visibledropdown:=True

Here's a link to a test sheet
http://dl.dropbox.com/u/16052166/hide-arrow-test-sheet.xlsm

Any Ideas SHG or any other takers?
As this isn't my field,, I'm lost.......

Many thanks
JC
(& thanks again for that link SHG;
http://contextures.com/xlautofilter03.html#Hide
I've saved it to PC,, a good 1 :-)
 
Upvote 0
Just got up :-(

Had another look at this formula,,,,,,,
I still can't see why it isn't working?
can anybody advise please,,,
not sure I I get the error...
I'm sure I've done it as the webpage said,,
sample sheet link;

http://dl.dropbox.com/u/16052166/hide-arrow-test-sheet.xlsm

I just want to Hied 1 drop down arrow,, the $F$4" arrow.

Many thanks
JC
 
Last edited:
Upvote 0
###Big apologies here###
It was working,,,my mistake was in how I applied it :-(
I cross posted here also;
http://www.excelforum.com/excel-general/814848-remove-a-filter-arrow.html?p=2709497#post2709497

Basically I applied the filter before I ran the code,, expecting to see 1 filter disappear.

But it works the other way around...

IE,,, Run the macro,, then all the filters appear EXCEPT $F$4,,,

My mistake again :-(

Still,,,
many thanks to arlu1201
for pointing this out.

Case Closed!!!:-)
All the best

JC
 
Upvote 0

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top