+ Reply to Thread
Results 1 to 11 of 11

Autofilter macro

  1. #1
    Registered User
    Join Date
    02-01-2012
    Location
    Manchester, UK
    MS-Off Ver
    Excel 2010
    Posts
    97

    Autofilter macro

    Hi Everyone,

    I have spreadsheet that has two tabs. One the first tab, entitled 'Dashboard', I have the text along the lines of 'Search for a name here'

    On the second tab, entitled 'Team List' I have the details of the team, eg name, address, emergency contact etc.

    I recorded the following macro:-

    Please Login or Register  to view this content.
    What I want to do is type in 'Jones' into the search area, the marco to copy and paste that ino the autofilter, and all of the names with 'Jones' be displayed.

    The macro above works great for this, but if I enter 'Smith' it still displays the details for 'Jones'.

    I think its because of the "Bob Jones", - "David Jones",- "Sally Jones") bit, but I dont know what the generic script for this would be.

    Can anyone help?

    Thanks
    Alex

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Autofilter macro

    Can you attach your file?

  3. #3
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Autofilter macro

    Alex,

    Something like this should work for you:
    Please Login or Register  to view this content.
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Registered User
    Join Date
    02-01-2012
    Location
    Manchester, UK
    MS-Off Ver
    Excel 2010
    Posts
    97

    Re: Autofilter macro

    Hi, Thank you for your help so far, unfortunately the code supplied by Tigeravatar didnt work work, although your help is appreciated. The debugger wouldnt go past the range section but Im not sure why not.

    I have attached a VERY basic version of my file. Please dont think that my excel training has been that simple!

    Thanks for your help
    Alex
    Attached Files Attached Files

  5. #5
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Autofilter macro

    hi Alex, if it is to search on column B only it can be done this way
    Attached Files Attached Files
    Last edited by watersev; 12-07-2012 at 05:26 AM.

  6. #6
    Registered User
    Join Date
    11-27-2012
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Autofilter macro

    Hi Watersev, this is fantastic and also answers my question! Just one thing, can I keep the hyperling associated with the original cell?
    thanks

  7. #7
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Autofilter macro

    Forum Rules
    2. Don't post a question in the thread of another member -- start your own. If you feel it's particularly relevant, provide a link to the other thread.
    Last edited by watersev; 12-10-2012 at 09:19 AM.

  8. #8
    Registered User
    Join Date
    02-01-2012
    Location
    Manchester, UK
    MS-Off Ver
    Excel 2010
    Posts
    97

    Re: Autofilter macro

    Hi,

    Thanks for all your help. Im sorry its taken so long to get back, Ive been away from work for a few days.

    The file attached above says that it corrupt when I try to open it. Am I doing something wrong when opening? Ive tried to save it first with the same result.

    Would you be able to post the code by any chance?

    Thanks again
    Alex

  9. #9
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Autofilter macro

    checked the attached file, works normally

    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    02-01-2012
    Location
    Manchester, UK
    MS-Off Ver
    Excel 2010
    Posts
    97

    Re: Autofilter macro

    Briliant, thanks Watersev. Ill try it straight away.

  11. #11
    Registered User
    Join Date
    02-01-2012
    Location
    Manchester, UK
    MS-Off Ver
    Excel 2010
    Posts
    97

    Re: Autofilter macro

    Wow! Thats fantastic!

    Thank you so much,
    Alex

+ 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