+ Reply to Thread
Results 1 to 12 of 12

Auto Filtering Multi-Fields / Columns

  1. #1
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Auto Filtering Multi-Fields / Columns

    I've researched the Forum and the Web for assistance without success.

    Want to Auto Filter Table1 by reviewing several Fields (columns) at the same time.

    The workbook has TextBox1 at the top of the sheet for entering the 'Filter/Search Term'.
    Type in the filter term and it "auto populates" the row display and narrows down the filtering as each additional
    character is entered. If the macro utilizes only one Field/Column for filtering, it functions as expected.

    This is the single field macro approach that functions properly :

    Please Login or Register  to view this content.
    The above macro utilizes a FILTER and a ROW column as part of the Table :

    Filter Row.jpg



    If more than one Field/Column is stated in the macro, it will not function as needed. Nothing
    is returned ... no error messages.


    Examples of code (not actual workbooks) on the Web indicate the possibility of doing the following for
    multi-fields / columns:

    Please Login or Register  to view this content.
    No Luck.

    I've tried giving each Field/Column it's own macro & TextBox ... no luck.


    I would really like to be able to AutoFilter the table (49 columns) by focusing (at a minimum) on any
    of 4 - 6 total Fields/Columns. The process must use the TextBox for user ease.

    Suggestions ? Thank you.
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,522

    Re: Auto Filtering Multi-Fields / Columns

    Perhaps
    Please Login or Register  to view this content.

  3. #3
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: Auto Filtering Multi-Fields / Columns

    jindon:

    Thank you so much for your reply.

    Question: How can the macro be edited so it will display all possible 'returns' and narrow those down as each additional character is entered in the TextBox ?

    Presently, if a Company Name contains more than one character, all characters need to be entered and match before a return is displayed.
    The example project I was using as a pattern provided partial matches as the characters were typed.

    [ attached ]
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Auto Filtering Multi-Fields / Columns

    not as fancy as jindon's but since i already did the code

    Please Login or Register  to view this content.
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  5. #5
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,522

    Re: Auto Filtering Multi-Fields / Columns

    Are you sure about the attachment?

    It seems totally different.

  6. #6
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: Auto Filtering Multi-Fields / Columns

    jindon:

    It is different. But I was trying to implement that code in my workbook.
    That code works in my project but only for one column.

    I probably missed something but thought I had captured everything there was.
    The main difference is the number of columns my workbook is utilizing.

    I have not seen anything that specifies a limitation on the number of columns. Is there a limitation ?


    humdingaling:

    Your code is close however the first field (2) is not capturing all possibilities at first then narrowing down the possibilities. The
    other fields work as desired.

  7. #7
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,522

    Re: Auto Filtering Multi-Fields / Columns

    Don't understand which file you are talking about.

    If it is the first one, just add asterisk after the criteria
    i.e
    Please Login or Register  to view this content.

  8. #8
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: Auto Filtering Multi-Fields / Columns

    jindon:

    Added the asterisk.

    Please Login or Register  to view this content.
    TextBox 1 not returning anything. Other textboxes worked as desired. This is using your macro in Post #2



    The attachment I spoke of in Post #6 is attached in Post #3. The code in attachment of Post #3 works in
    my workbook but for only one field/column. Couldn't get it to function for multiple columns.

  9. #9
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,522

    Re: Auto Filtering Multi-Fields / Columns

    Because the numeric value, you need to add apostrophe like '1, '2, etc. if you need to use wild card.

  10. #10
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: Auto Filtering Multi-Fields / Columns

    jindon:

    Ok, got that to work. But I'm concerned about the end user.

    Tried formatting the column (#2) as Text but that didn't make a difference.

    I could add some code to automatically add the apostrophe so the user doesn't have to remember but I wonder
    if there is another way of doing this so the apostrophe doesn't need to be used at all ?


    Thank you so much for all you help.

    It's late here now. Have to get some sleep. I will check in the morning for any additional suggestions ya'all might
    have.

    Thanks again ! Happy Memorial Day !

  11. #11
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,522

    Re: Auto Filtering Multi-Fields / Columns

    You can convert it to text before the loop
    Please Login or Register  to view this content.

  12. #12
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: Auto Filtering Multi-Fields / Columns

    jindon:

    Thank you so much for your efforts. The filtering process is now complete.

    You and humdingaling have been an immense help.

    Have a great day !

+ 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. Multi-Line Excel Address Fields - How to split and move to other columns
    By mjwillyone in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-17-2017, 02:54 PM
  2. Checklist and/or Multi Filtering
    By danallamas in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-02-2015, 11:12 PM
  3. 1 column into multi-columns and multi-rows
    By affj in forum Excel General
    Replies: 7
    Last Post: 07-17-2013, 09:34 AM
  4. Multi-Column Filtering
    By shotsy247 in forum Excel General
    Replies: 2
    Last Post: 04-27-2010, 09:12 AM
  5. Lookup multi columns w/ multi answers
    By dec671 in forum Excel General
    Replies: 1
    Last Post: 01-28-2010, 04:48 PM
  6. [SOLVED] Excel SHOULD NOT AUTO-CHANGE formated text fields to DATE FIELDS!
    By PSSSD in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-08-2006, 04:35 PM
  7. Excel Multi-Column Filtering
    By DoctorV in forum Excel General
    Replies: 0
    Last Post: 02-03-2005, 02:58 PM

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