+ Reply to Thread
Results 1 to 4 of 4

Autofilter, criteria from InputBox and Wildcard

  1. #1
    Registered User
    Join Date
    10-17-2011
    Location
    Seattle, USA
    MS-Off Ver
    Excel 2007
    Posts
    79

    Autofilter, criteria from InputBox and Wildcard

    Hi,

    I have created application which relies on a filter. It works, even if not very efficiently, but I have an issue left; I don't know how to use the input from an user for the "contains" filter.
    In the example attached, if 'Red' is entered in the InputBox, IDFilterValue returns '*Red*' (syntax for 'contains "Red" '), but Autofilter doesn't work as expected. If '*Red*' is entered as such in the code, as Criteria1, then it works.

    I guess that there is something wrong with the variable, as the writing of idfiltervalue is not automatically changed to IDFilterValue. But I couldn't find the answer to my problem in the help.

    Any help would be appreciated,
    Thank you!

    Please Login or Register  to view this content.
    TestFilterContain.xlsm

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Autofilter, criteria from InputBox and Wildcard

    Maybe:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    10-17-2011
    Location
    Seattle, USA
    MS-Off Ver
    Excel 2007
    Posts
    79

    Re: Autofilter, criteria from InputBox and Wildcard

    Thank you so much!
    I can now see how I was approaching this problem exactly the opposite/wrong way.

  4. #4
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Autofilter, criteria from InputBox and Wildcard

    You're welcome. Glad to help out and thanks for the feedback.

+ 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. Replies: 4
    Last Post: 03-16-2013, 08:33 AM
  2. Replies: 2
    Last Post: 07-06-2012, 11:42 AM
  3. Inputbox cancels the autofilter mode. VBA
    By Lifeseeker in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-16-2012, 01:58 PM
  4. Autofilter with inputbox
    By aakeboe in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-01-2010, 11:02 AM
  5. Add autofilter criteria to macro via inputbox
    By pierpont in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-21-2007, 03:15 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