+ Reply to Thread
Results 1 to 3 of 3

VBA or Macro to control data filter

Hybrid View

GregM56 VBA or Macro to control data... 04-15-2019, 12:45 PM
JLGWhiz Re: VBA or Macro to control... 04-15-2019, 03:15 PM
GregM56 Re: VBA or Macro to control... 04-16-2019, 03:22 PM
  1. #1
    Forum Contributor
    Join Date
    06-08-2012
    Location
    Panama City, FL
    MS-Off Ver
    Excel 2016
    Posts
    175

    VBA or Macro to control data filter

    Hi friends,

    I have a sheet with two rows of headers. When a user selects Data>Filter and clicks on the down-arrow for the field she wants to sort, she gets a list of checkbox selections showing the data in that field. She can then uncheck any data she doesn't want included. It also includes check-boxes for the second header row (by displaying the text in that header) and (Blanks).

    It's difficult to tell ALL USERS to be sure not to uncheck those last two check-boxes. Rather, I'd very much like for that filter box to open and EITHER grey out those two selections or just not show them at all since I ALWAYS want them to be displayed.

    Is this request even possible? If so, I'd greatly appreciate a script (or some kind of instructions if there's another way to solve this) to perform this task.

    Thanks in advance from anyone willing to share their skills and knowledge with me.
    Attached Images Attached Images

  2. #2
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: VBA or Macro to control data filter

    You don't have any options for the manual operation other than the ability of the user to understand instructions to not uncheck those two boxes. The alternative method would be to use VBA to execute the filter where a predetermined criteria array could be used. But then, it takes away the user's ability to choose which data they do not want to filter.
    Any code provided by me should be tested on a copy or a mock up of your original data before applying it to the original. Some events in VBA cannot be reversed with the undo facility in Excel. If your original post is satisfied, please mark the thread as "Solved". To upload a file, see the banner at top of this page.
    Just when I think I am smart, I learn something new!

  3. #3
    Forum Contributor
    Join Date
    06-08-2012
    Location
    Panama City, FL
    MS-Off Ver
    Excel 2016
    Posts
    175

    Re: VBA or Macro to control data filter

    Thank you very much for the reply. I didn't think I'd be able to do it -- I was just hoping someone knew a trick.
    Have a good day!

+ 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. A control button to run a macro using the data from the cells on the same row
    By 4help4excel in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-21-2015, 03:28 PM
  2. [SOLVED] Control 3 Pivot Table filter with Data validation
    By PWinkz in forum Excel General
    Replies: 3
    Last Post: 05-06-2015, 07:48 AM
  3. Need help with macro for filtering worksheet data based on combobox control
    By preetypj in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-03-2014, 07:28 AM
  4. Macro to filter data to search terms selected from ComboBox (Form Control)
    By JasonRay in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-08-2013, 05:08 PM
  5. Filter control
    By FDG1337 in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 02-15-2013, 04:52 AM
  6. sorting data using macro in a spreadsheet control object
    By avendesora in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-12-2007, 06:29 AM
  7. How do I control Auto Filter in VBA
    By Mallycat in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-18-2006, 04:10 AM

Tags for this Thread

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