+ Reply to Thread
Results 1 to 10 of 10

button to filter rows

  1. #1
    Forum Contributor
    Join Date
    10-18-2012
    Location
    new york
    MS-Off Ver
    Office 365
    Posts
    177

    button to filter rows

    Hi, I am trying to create a spreadsheet where there is a table of information and two buttons above, one that says 'show resolved' and one that says show 'ongoing' and when you click one it filters out all the rows in the table that say either resolved or ongoing depending on which button you clicked. I would also like a 'show all button' which shows everything.
    Is anyone able to help me? I am so new to VBA that when I google it I just get nowhere!
    Thanks

  2. #2
    Registered User
    Join Date
    12-21-2012
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    21

    Re: button to filter rows

    for "show resolved" use below code:
    Please Login or Register  to view this content.
    for "show ongoing" use below code:
    Please Login or Register  to view this content.
    for show all use below code:
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    10-18-2012
    Location
    new york
    MS-Off Ver
    Office 365
    Posts
    177

    Re: button to filter rows

    Wow thank you...would you mind explaining how I input these codes?

  4. #4
    Registered User
    Join Date
    12-21-2012
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    21

    Re: button to filter rows

    if you want to use 3 buttons insert 3 modules and copy paste these codes one in each of them. then to add buttons on the sheet where your data is, add 3 buttons using insert shape then right click on them and click on asign macro and select appropriate macro. i hope that helps

  5. #5
    Forum Contributor
    Join Date
    10-18-2012
    Location
    new york
    MS-Off Ver
    Office 365
    Posts
    177

    Re: button to filter rows

    Hmm it doesn't like it for some reason. It says autofilter method of range class failed?!
    Thanks for helping me

  6. #6
    Registered User
    Join Date
    12-21-2012
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    21

    Re: button to filter rows

    if you can attach your worksheet i would be able to better identify problem

  7. #7
    Forum Contributor
    Join Date
    10-18-2012
    Location
    new york
    MS-Off Ver
    Office 365
    Posts
    177

    Re: button to filter rows

    Ok I will do this as soon as I find a computer that will actually log into this site! Having troubles and using my phone. May be a day or so.
    Thank you!

  8. #8
    Forum Contributor
    Join Date
    10-18-2012
    Location
    new york
    MS-Off Ver
    Office 365
    Posts
    177

    Re: button to filter rows

    Hi there, sorry for the delay. the computer i usually use cannot log into this site. i have attached my workbook and as you can see when i click the buttons i get an error message. any help would be greatly appreciated.
    thank you
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    12-21-2012
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    21

    Re: button to filter rows

    Hi
    your header range in sheet was different from the code. i have changed it to current range try now
    Attached Files Attached Files

  10. #10
    Forum Contributor
    Join Date
    10-18-2012
    Location
    new york
    MS-Off Ver
    Office 365
    Posts
    177

    Re: button to filter rows

    brilliant thank you so much

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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