+ Reply to Thread
Results 1 to 2 of 2

Filter Table by Checkboxes

Hybrid View

  1. #1
    Registered User
    Join Date
    05-27-2021
    Location
    Germany
    MS-Off Ver
    Microsoft Office 365
    Posts
    18

    Red face Filter Table by Checkboxes

    Dear all,

    After trying a number of code variations but never getting anywhere, I am turning to you.

    Here is an attached file with which I am trying to achieve the following:

    Use the Checkboxes to filter the orange table, column 3. 3 Checkboxes entered already, eventually I'd like to expand this to all languages.

    I would like to be able to check multiple checkboxes at once and if none are checked, show the whole table.

    Thanks kindly for anybody's time!
    Attached Files Attached Files

  2. #2
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,275

    Re: Filter Table by Checkboxes

    Possibly...
    Option Explicit
    Sub Fltr()
        Dim d As Object
        Dim ckbx As Object
    
        Set d = CreateObject("Scripting.Dictionary")
        With Worksheets("Trial File ")
            For Each ckbx In .OLEObjects
                If TypeName(ckbx.Object) = "CheckBox" Then
                    If ckbx.Object.Value = True Then
                        d.Item("*" & ckbx.Name & "*") = Empty
                    End If
                End If
            Next ckbx
            If d.Count = 0 Then d.Item("*") = Empty
            .ListObjects(1).Range.AutoFilter Field:=2, Criteria1:=d.keys, Operator:=xlFilterValues
        End With
        d.RemoveAll
    End Sub

+ 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] Filter one column with multiple checkboxes
    By pjohnson05 in forum Excel Programming / VBA / Macros
    Replies: 22
    Last Post: 12-15-2021, 03:19 PM
  2. Filter Cells using Checkboxes
    By MovieBuff in forum Excel General
    Replies: 28
    Last Post: 02-24-2021, 06:16 PM
  3. VBA Filter for all sheets (checkboxes)
    By MartinV10 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-27-2019, 11:26 AM
  4. Filter scrambles my checkboxes
    By jamie_sangster in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-18-2018, 05:43 PM
  5. [SOLVED] Multiple Checkboxes to filter
    By Ashley.Martin100208 in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 12-17-2014, 10:33 AM
  6. Using checkboxes to filter a list
    By Pete1989 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-15-2014, 06:57 PM
  7. [SOLVED] Use Checkboxes to Filter a List
    By corrinrenee in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-02-2013, 08:23 PM

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