+ Reply to Thread
Results 1 to 5 of 5

Auto Filter Using Macro

  1. #1
    Forum Contributor
    Join Date
    03-31-2009
    Location
    Dartford
    MS-Off Ver
    Excel 2007
    Posts
    237

    Auto Filter Using Macro

    Hi All,

    I have a Spreadsheet with names and other data, my question is, can i somehow Auto Filter the First name with a macro that I can assign to a button, what I would like to do is type the First Name in A1 and in A2 have a button that I can press and it will filter all with the name I have typed in A1.

    I know it probably can be done but I am not sure how.

    Any help would be greatly appreciated.

    Shazz
    xx
    Last edited by Shazz; 02-27-2012 at 04:54 AM. Reason: solved

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Auto Filter Using Macro

    Hi Shazz,

    Using wildcard characters, you can achieve the desired result.
    If you want to try it on your own.. just record a quick macro to achieve the auto filter... now in criteria, change the reference to A1 - surrounded by *.

    Any issues, post a sample file. Thanks.


    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  3. #3
    Forum Contributor
    Join Date
    03-31-2009
    Location
    Dartford
    MS-Off Ver
    Excel 2007
    Posts
    237

    Re: Auto Filter Using Macro

    Thanks for your reply, I am very new to all this, I can only do basic macros etc, can you also advise how I go about recording teh macro to acheive the autofilter.

    Thanks

    Shazz
    xx

  4. #4
    Forum Contributor
    Join Date
    03-31-2009
    Location
    Dartford
    MS-Off Ver
    Excel 2007
    Posts
    237

    Re: Auto Filter Using Macro

    I have attached a workbook showing what I would like to do, I did try making a macro for the auto filter but I wasn't at all sure what I was doing.

    Your hekp is appreciated.

    Shazz
    xx
    Attached Files Attached Files
    Last edited by Shazz; 02-23-2012 at 09:44 AM. Reason: subscribe

  5. #5
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Auto Filter Using Macro

    Hi Shazz,

    See the attached file and click on the button to test the macro.
    It is considering the first name only.

    Regards,

    DILIPandey

    <click on below 'star' if this helps>
    Attached Files Attached Files

+ 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