+ Reply to Thread
Results 1 to 7 of 7

Macro Button Filter

  1. #1
    Registered User
    Join Date
    09-17-2009
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    4

    Macro Button Filter

    Hi All

    I'm looking for some help?

    Attached is an example of a projects issues log with a load of data in columns.

    you will see at the top column B, that I have pre defined critera i.e. pre-install, post-install and post commissioning.

    I want to create individual macro buttons (pre-install, post-install and post commissioning) that when pressed will only sorts by those individual criteria's.

    Please ask questions

    All the help would be much appreciated.

    Many Thanks
    Attached Files Attached Files

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: Excel 2007 VBA Macro Button Filter

    You said you want to sort based on the criteria - post commissioning, Post-install, etc? But this cannot be done in the same sheet since the data is in 1 column. What are you trying to achieve through this? Do you want only those criteria cells to be visible when clicked?

    You also have some macro requirement in rows 2 and 3? What is that about?
    Last edited by arlu1201; 11-03-2011 at 03:12 AM.

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Excel 2007 VBA Macro Button Filter

    The best way to start would be to use the Macro Recorder to get the basic code. The Macro Recorder is in the Developer tab of the Excel 2007 & 2010.This will need editing so you can post back with the code for further help.


    Note your profile says that you are using Excel 2003, your example is from the newer Excel versions so you need to amend your profile
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  4. #4
    Registered User
    Join Date
    09-17-2009
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Excel 2007 VBA Macro Button Filter

    Quote Originally Posted by arlu1201 View Post
    You said you want to sort based on the criteria - post commissioning, Post-install, etc? But this cannot be done in the same sheet since the data is in 1 column. What are you trying to achieve through this? Do you want only those criteria cells to be visible when clicked?

    You also have some macro requirement in rows 2 and 3? What is that about?
    Ok apologies for not being clear

    I want to essentially automate the spreadsheet. I have limited knowledge of excel VBA/macros.

    For example
    If I had a automated sort button, so when I clicked on let say post install the spreadsheet would automatically show all the rows that are associated with "post-install"

    This can be manually done by the filter feature in excel, but as more and more data gets entered the manual way becomes time consuming. hence automating with buttons at the top of the worksheet.

    Hope this makes more sense.

    Thanks

  5. #5
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: Excel 2007 VBA Macro Button Filter

    I have inserted 3 buttons in place of your text fields in column B (as i couldn't assign macros to them). See if this is what you need.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    09-17-2009
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Excel 2007 VBA Macro Button Filter

    Quote Originally Posted by arlu1201 View Post
    I have inserted 3 buttons in place of your text fields in column B (as i couldn't assign macros to them). See if this is what you need.
    arlu1201

    You absolute legend!. the text fields were just there for my mental note.

    I will have a play with my other text fields to see if I can get those to sort as well.

    Once again you are a life saver.

    if you are ever in reading let me know I buy you a couple of pints.


    cheers

  7. #7
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: Macro Button Filter

    Hey thank you very much....but i dont drink....am glad it worked for you...if you check the code, its just a small one-liner...

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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