Macro for Auto Filter to hide on some columns

scottmac

New Member
Joined
Jul 25, 2013
Messages
3
Hi can anyone please help me with a macro code please

I want to hide auto filter on the following columns A,B,C,F,G,N,M,AB,AD
But want to show in all other columns

How can i do this?

been trying all day and i bet it is simple lol i am using excel 2003 :confused:
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Try, Assuming your dropdown arrows are in row 1
Code:
Sub Hide_Dropdown()
With Range("A1:AD1")
    .AutoFilter field:=1, Visibledropdown:=False
    .AutoFilter field:=2, Visibledropdown:=False
    .AutoFilter field:=3, Visibledropdown:=False
    .AutoFilter field:=6, Visibledropdown:=False
    .AutoFilter field:=7, Visibledropdown:=False
    .AutoFilter field:=13, Visibledropdown:=False
    .AutoFilter field:=14, Visibledropdown:=False
    .AutoFilter field:=28, Visibledropdown:=False
    .AutoFilter field:=30, Visibledropdown:=False
End With
End Sub
 
Upvote 0
Worked thanks

Try, Assuming your dropdown arrows are in row 1
Code:
Sub Hide_Dropdown()
With Range("A1:AD1")
    .AutoFilter field:=1, Visibledropdown:=False
    .AutoFilter field:=2, Visibledropdown:=False
    .AutoFilter field:=3, Visibledropdown:=False
    .AutoFilter field:=6, Visibledropdown:=False
    .AutoFilter field:=7, Visibledropdown:=False
    .AutoFilter field:=13, Visibledropdown:=False
    .AutoFilter field:=14, Visibledropdown:=False
    .AutoFilter field:=28, Visibledropdown:=False
    .AutoFilter field:=30, Visibledropdown:=False
End With
End Sub
 
Upvote 0

Forum statistics

Threads
1,215,036
Messages
6,122,794
Members
449,095
Latest member
m_smith_solihull

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