+ Reply to Thread
Results 1 to 3 of 3

Excel VBA data row not filtering

  1. #1
    Registered User
    Join Date
    12-15-2014
    Location
    Wales, UK
    MS-Off Ver
    365
    Posts
    66

    Excel VBA data row not filtering

    Good day,

    I am trying to open a specified workbook, search for a "text"/term and set it as a range (That will be the headers for the tables). Then I clear auto filter and search for a specific column heading that needs to be filtered (I will add more columns to search for and filter).

    Problem is that it is not filtering the header and I don;t know what the problem is, I'm not getting any errors. Below is the code. Section in red that is not working.

    Please Login or Register  to view this content.
    Last edited by Simone Fick; 03-29-2018 at 03:28 AM. Reason: Solved

  2. #2
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Excel VBA data row not filtering

    You created variable FilterField as a range
    .. So VBA is expecting:
    Set FilterField As....

    But your VBA does not use Set when attributing the value:
    FilterField = WorksheetFunction...

    And Field:= is looking for a number ???


    Perhaps
    Please Login or Register  to view this content.
    What will the match function return?

    Or possibly???
    Please Login or Register  to view this content.
    And
    Please Login or Register  to view this content.
    Last edited by kev_; 03-18-2018 at 07:15 PM.
    Click *Add Reputation to thank those who helped you. Ask if anything is not clear

  3. #3
    Registered User
    Join Date
    12-15-2014
    Location
    Wales, UK
    MS-Off Ver
    365
    Posts
    66

    Re: Excel VBA data row not filtering

    Hi Kev,

    Thanks for the reply. I manage to get it working without using "SET" with the below code:

    Please Login or Register  to view this content.
    Thanks for the help though.

+ 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] Need help filtering data by filtering based on the last digit of a column/true statement
    By Stephen R in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-11-2014, 07:43 AM
  2. Excel 2007 - Help filtering Data
    By cknight3 in forum Excel General
    Replies: 1
    Last Post: 05-23-2012, 11:12 AM
  3. [VBA] Filtering Data from Excel worksheet
    By qiqinuinaifen128 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-14-2012, 12:04 PM
  4. Excel Filtering data help
    By bala06 in forum Excel General
    Replies: 1
    Last Post: 06-04-2011, 10:04 AM
  5. Filtering Data in Excel
    By bears in forum Excel General
    Replies: 2
    Last Post: 01-07-2010, 01:12 PM
  6. Filtering Data in excel
    By CJDJ in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-01-2008, 04:53 PM
  7. Filtering Data in Excel
    By Idunno in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 08-15-2005, 11:05 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