Results 1 to 6 of 6

VBA Autofilter -- Not filtering

Threaded View

  1. #1
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2505 Win 11
    Posts
    24,719

    VBA Autofilter -- Not filtering

    Attached is a sample file. I am attempting to filter Column C employing VBA. I wish to filter so that only records beginning with 53 are visible. When I run this, it returns no records.

    Code employed:

    Sub Filt()
        Dim lr As Long
        lr = Range("A" & Rows.Count).End(xlUp).Row
        Range("A1:L1").Select
        Selection.AutoFilter
        ActiveSheet.Range("A1:L" & lr).AutoFilter Field:=3, Criteria1:="=53*"
        
    End Sub
    Seem to be having a senior moment and cannot get the criteria correct.

    TIA

    Alan
    Attached Files Attached Files
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. AutoFilter: Setting Criteria1 to an Array for "Any of these words" type filtering
    By sheldonbeswift in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-16-2013, 10:57 AM
  2. AutoFilter is not filtering properly
    By Excel_vba in forum Excel General
    Replies: 1
    Last Post: 09-26-2012, 07:51 PM
  3. Filtering with Wildcards using Autofilter
    By Motox in forum Excel General
    Replies: 2
    Last Post: 03-16-2012, 06:40 AM
  4. [SOLVED] Autofilter Not Filtering Properly
    By Paputxi in forum Excel General
    Replies: 1
    Last Post: 05-03-2006, 01:35 PM
  5. AutoFilter only filtering first 1000
    By Denise Robinson in forum Excel General
    Replies: 2
    Last Post: 03-21-2005, 06:06 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