+ Reply to Thread
Results 1 to 4 of 4

Filter buttons

  1. #1
    Registered User
    Join Date
    09-26-2014
    Location
    Australia
    MS-Off Ver
    Office 2013
    Posts
    2

    Filter buttons

    Hi,
    I am creating an excel spreadsheet for the use of accounting.
    I have created several buttons on each page using the hyperlink function and they are working fine.
    I was just wondering how to create a button for filters?
    I have seen people's where they have a button and when you press it the data is automatically filtered and if you press it again the filter is gone.
    Any help would be appreciated!
    Thanks!

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Filter buttons

    Something like:
    Please Login or Register  to view this content.
    Tweak to suit your workbook.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Registered User
    Join Date
    09-26-2014
    Location
    Australia
    MS-Off Ver
    Office 2013
    Posts
    2

    Re: Filter buttons

    Where do you put that information in?
    Sorry im hopeless with excel.

  4. #4
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Filter buttons

    Click Developer Ribbon > Insert > ActiveXControls: CommandButton.
    Draw a button on your worksheet.
    Right click button > View code
    This takes you to the VBE (visual basic editor) where you can edit macros.
    You will see something like:
    Please Login or Register  to view this content.
    Enter the code from above into this sub, so it looks like:
    Please Login or Register  to view this content.
    Change the range reference, filter field number and criteria text to suit what you want.

    Press Alt-Q to close the VBE and return to Excel.
    Click Developer Ribbon > Design Mode, to turn design mode off again.

    You can now click your button to apply / remove a filter.

+ 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. Progressively filter a sheet using buttons and vba
    By nobby2193 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-09-2013, 04:47 AM
  2. 4 buttons and a filter..
    By wildbill in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-22-2011, 04:26 AM
  3. Filter with protected sheets/buttons
    By NoiCe in forum Excel General
    Replies: 1
    Last Post: 11-19-2009, 07:23 PM
  4. filter using buttons
    By anuj_sethi1043 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-17-2009, 04:14 AM
  5. [SOLVED] No filter buttons
    By Reney Langlois in forum Excel General
    Replies: 5
    Last Post: 02-10-2005, 06:06 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