+ Reply to Thread
Results 1 to 3 of 3

Selecting different columns to filter...

  1. #1
    Forum Contributor
    Join Date
    08-07-2012
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    202

    Selecting different columns to filter...

    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.

  2. #2
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Re: Selecting different columns to filter...

    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.
    Please Login or Register  to view this content.
    HTH

    DominicB

  3. #3
    Forum Contributor
    Join Date
    08-07-2012
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    202

    Re: Selecting different columns to filter...

    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!!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Selecting certain range after filter.
    By countryfan_nt in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-18-2017, 11:38 AM
  2. [SOLVED] Selecting all data in specific columns without selecting adjacent column.
    By EnigmaMatter in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-11-2014, 02:20 AM
  3. Selecting all data in specific columns without selecting adjacent column.
    By EnigmaMatter in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-10-2014, 03:50 PM
  4. [SOLVED] Issue w/ Current Region, Select 3 Columns of Data without selecting adjacent columns
    By EnigmaMatter in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-10-2014, 02:57 PM
  5. Code for selecting row after filter
    By Kedar Shukla in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-03-2012, 07:42 AM
  6. Selecting the cell below, with Filter on in VBA
    By mzuuzair in forum Excel General
    Replies: 2
    Last Post: 04-18-2012, 10:10 AM
  7. Selecting more than one filter values
    By jamex in forum Excel General
    Replies: 2
    Last Post: 03-18-2006, 10:40 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1