+ Reply to Thread
Results 1 to 5 of 5

Autofilter numeric help

  1. #1
    Registered User
    Join Date
    03-25-2021
    Location
    Finland
    MS-Off Ver
    365
    Posts
    2

    Autofilter numeric help

    Hi,

    I need help with an autofilter function.

    I want to filter out all cells in following format:

    ABC001ABC

    The first 3 characters are always some random letters, character 3 and 4 are numbers between 0-9, and the characters afterwards doesn't matter what they are.

    I've tried variations of the code below, but since numeric wildcards doesn't work in autofilter I'm out of ideas..
    .Columns(1).Resize(, lCol).AutoFilter Field:=2, Criteria1:="???##*", Operator:=xlFilterValues

    Maybe It's possible to use greater and less than operators but I don't know how to implement it properly in the autofilter code.

    Thanks in advance.
    Attached Files Attached Files
    Last edited by lutsi; 03-25-2021 at 05:03 AM.

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: Autofilter numeric help

    Fast answers need visual help. Please read the yellow banner at the top of this page on how to attach a file.

  3. #3
    Registered User
    Join Date
    03-25-2021
    Location
    Finland
    MS-Off Ver
    365
    Posts
    2

    Re: Autofilter numeric help

    Quote Originally Posted by Pepe Le Mokko View Post
    Fast answers need visual help. Please read the yellow banner at the top of this page on how to attach a file.
    Thanks, fixed

  4. #4
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: Autofilter numeric help

    Perhaps also post your code? You did not post an xlsm file?

  5. #5
    Valued Forum Contributor
    Join Date
    07-14-2017
    Location
    Poland
    MS-Off Ver
    Office 2010
    Posts
    528

    Re: Autofilter numeric help

    @lutsi, try to use 'Advance Filter'.

    Select 'BG1: BG2' as criteria.

    'BG1' empty cell
    'BG2' (formula) = isnumber (-- mid (b2,4,2))
    It should work.
    Best Regards,
    Maras.

+ 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] Type Mismatch, variant variable although numeric won't allow numeric manipulation
    By Rokn in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-25-2016, 04:02 PM
  2. Replies: 2
    Last Post: 03-17-2016, 08:55 AM
  3. Replies: 9
    Last Post: 11-18-2013, 07:40 AM
  4. [SOLVED] Create a formula that ignores when non-numeric value is entered in numeric field
    By lukela85 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-24-2013, 07:22 AM
  5. Replies: 4
    Last Post: 02-06-2006, 03:05 AM
  6. [SOLVED] Match Single Numeric Criteria and Return Multiple Numeric Labels
    By Sam via OfficeKB.com in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-30-2005, 04:10 PM
  7. [SOLVED] Match Single Numeric Criteria and Return Multiple Numeric Labels
    By Sam via OfficeKB.com in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 12-29-2005, 04:50 PM

Tags for this Thread

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