+ Reply to Thread
Results 1 to 11 of 11

how to link validation list and advanced search

  1. #1
    Registered User
    Join Date
    07-13-2015
    Location
    hong kong
    MS-Off Ver
    ms 2010
    Posts
    16

    how to link validation list and advanced search

    I want the list Sheet1!A6:E35 to be auto filtered if I choose a value from the validation list at A1. How can I do that?

    Please help.
    Attached Files Attached Files

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: how to link validation list and advanced search

    Hi heidiau,

    I took your dummy workbook and recorded a macro to do an advanced filter in place. I needed to add a row 1 to have the word "Teacher" above the cell that changes. Then I put an event macro behind sheet one that would fire when A2 changed. It then calls the Macro2 to do the Advanced Filter.

    Hope this example helps you figure it out.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    07-13-2015
    Location
    hong kong
    MS-Off Ver
    ms 2010
    Posts
    16

    Re: how to link validation list and advanced search

    Hi MarvinP,

    thank you for your suggestion, but I have no idea about macro. I tried to copy the code to my file, but it doesn't work. Are there any other ways to obtain the same result without using macro?

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: how to link validation list and advanced search

    OK -

    Excel has a feature built into it for this exact type of problem. It is called Auto Filters. See the attached where you don't need a validation dropdown. You simply do an auto filter with your data. See the attached and read:
    http://www.contextures.com/xlautofilter01.html
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    07-13-2015
    Location
    hong kong
    MS-Off Ver
    ms 2010
    Posts
    16

    Re: how to link validation list and advanced search

    thank you for the information. but this cannot fit my needs.

    I'll figure out the macro things.

    thank you.

  6. #6
    Registered User
    Join Date
    07-13-2015
    Location
    hong kong
    MS-Off Ver
    ms 2010
    Posts
    16

    Re: how to link validation list and advanced search

    i can't go to the link you gave me, but i tried to record macro and i failed. below is my steps:

    design mode
    record macro
    data>advanced filter (in-place)
    stop macro

    what did i miss?

  7. #7
    Valued Forum Contributor
    Join Date
    03-20-2011
    Location
    UK
    MS-Off Ver
    Excel 2007/10/16
    Posts
    840

    Re: how to link validation list and advanced search

    Hi

    Try this
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    This is array formula? Press same time "Ctrl+Shift+Enter" NOT ENTER till you see both end like this {}, then copy down and cross.

    or
    AGGREGATE? This only work excel 2010 onward? Won't work before 2010, if you on excel 2003 or 2007
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Enter, then copy down and cross.

    See the file.
    To help you by my post? it would be nice to click on to say "Thank you".
    If you are happy with a solution to your problem?
    Click Thread Tools above your first post,
    select "Mark your thread as Solved".

  8. #8
    Registered User
    Join Date
    07-13-2015
    Location
    hong kong
    MS-Off Ver
    ms 2010
    Posts
    16

    Re: how to link validation list and advanced search

    hi micope21,

    when i want to show all again and clear content at Sheet1!A1, the data in the table changed to "0"

    hi MarvinP,

    I figure out how to record advanced filter. it works a the first attempt. but after i closed the file and opened the file again, the macro and the event on change code disappeared. why's that?

  9. #9
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: how to link validation list and advanced search

    Hi,

    I think you saved the file as an ".xlsx" instead of a ".xlsm" file type. The "m" stands for "macro". Try to save the file as a macro enabled file using the .xlsm extension on the filename.

  10. #10
    Registered User
    Join Date
    07-13-2015
    Location
    hong kong
    MS-Off Ver
    ms 2010
    Posts
    16

    Re: how to link validation list and advanced search

    hi MarvinP,

    i can apply the macro codes to my excel. thank you very much. it helps me save a lot of time when preparing documents.

  11. #11
    Valued Forum Contributor
    Join Date
    03-20-2011
    Location
    UK
    MS-Off Ver
    Excel 2007/10/16
    Posts
    840

    Re: how to link validation list and advanced search

    Change to this if there a blank cell A1
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Copy down. This will remove 0 to blank.

+ 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. [SOLVED] vlooup link to validation list
    By Yari1986 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-07-2013, 03:01 AM
  2. Replies: 7
    Last Post: 07-04-2013, 06:27 PM
  3. Advanced Data Validation List
    By crispybadger in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-05-2012, 02:15 PM
  4. Pivot list link to validation list
    By albert28 in forum Excel General
    Replies: 1
    Last Post: 09-27-2011, 05:54 AM
  5. creating VB code using advanced search criteria with multiple data validation lists?
    By Jonathan Bay in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-14-2011, 09:56 AM
  6. Replies: 3
    Last Post: 05-15-2011, 11:46 AM
  7. Search Table - Advanced Filter/Data Validation?
    By EmilyB in forum Excel General
    Replies: 1
    Last Post: 01-12-2011, 01:35 AM
  8. Using advanced filter to search for criteria in a list
    By Potatosalad2 in forum Excel General
    Replies: 1
    Last Post: 06-08-2005, 11:05 AM

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