+ Reply to Thread
Results 1 to 5 of 5

AutoFilter using wildcards

  1. #1
    Forum Contributor
    Join Date
    09-21-2015
    Location
    nederland
    MS-Off Ver
    2021
    Posts
    204

    AutoFilter using wildcards

    Dear all,

    I have a list of 100+ customer number and want to search it with variables such as find all numbers where number is "268", or is "12" etc

    The solution is in Excel’s custom AutoFilter and using wildcards in the criteria.

    I use below code but not working

    Please Login or Register  to view this content.


    example i would like to search all customer with number :
    268 the result must be 352689 and 322687
    12 the result must be : 100123 112345 287129


    customer number
    100123
    112345
    352689
    354278
    287129
    322687

    Thank you in advance for your help and support
    Kirana

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: AutoFilter using wildcards

    This thread will answer your request.

    https://www.excelforum.com/excel-pro...ank-value.html
    Last edited by AB33; 12-12-2017 at 01:20 PM.

  3. #3
    Forum Contributor
    Join Date
    09-21-2015
    Location
    nederland
    MS-Off Ver
    2021
    Posts
    204

    Re: AutoFilter using wildcards

    Dear AB33,

    Please help see attachement


    Thanks
    Kirana
    Attached Files Attached Files

  4. #4
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: AutoFilter using wildcards

    In order to use wildcards searching for numbers with autofilter the range where the numbers are must be formatted as text and the Criteria should look like this where i is a part of the number.

    Please Login or Register  to view this content.
    So if you had a range with headings in A1 and values in range A2:A7 and this range was formatted as text a macro like this could be used for filtering with wildcards.

    Please Login or Register  to view this content.
    Alf

  5. #5
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: AutoFilter using wildcards

    Read you PM but as your uploaded file is rater difficult to work with for me trying to test how to implement a number sorting macro I'll give it a pass.

    Not sure I understand. you problem i.e. you wish to enter part of a customer ID and then you got a range of customer where ID contains this part but how do you go from there?

    Will you from a group of say 4 customer select one or will you select all of them? Depending on the number of customers have you considered using a "drop-down" list instead of going for an autofilter?

    I've uploaded a small file where you can find numbers that contains a given part of a number. There are 3 macros. Macro "FindNumber" and "FindNumberAddress" works with numbers.
    Macro "FindNumber" will hide the rows that don't meet the criteria i.e. (the search part). To reset data after using this macro run "UnhideRows"

    The macro "FindNumbersAsText" will only work on Sheet("Numbers_As_Text") using autofilter settings. The other two macros will also work on this sheet without any problem but macro "FindNumber" will still hide rows where criteria is not met.

    Alf
    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)

Similar Threads

  1. Autofilter with wildcards!
    By kay007 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-12-2016, 04:03 AM
  2. [SOLVED] VBA - AutoFilter an array containing wildcards?
    By Tunesmith in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-03-2014, 01:48 PM
  3. Autofilter wildcards Excel 2007 VBA
    By jonas15 in forum Excel General
    Replies: 0
    Last Post: 12-19-2012, 09:00 AM
  4. Autofilter for 3 criteria using wildcards
    By gembrook in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-03-2012, 03:20 AM
  5. AutoFilter Wildcards
    By myers601 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-05-2012, 09:44 AM
  6. Filtering with Wildcards using Autofilter
    By Motox in forum Excel General
    Replies: 2
    Last Post: 03-16-2012, 06:40 AM
  7. Capturing the Excel AutoFilter Sorting Event-sort and autofilter options
    By Kognyto in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-11-2008, 05:36 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