+ Reply to Thread
Results 1 to 5 of 5

Programmatic Filter not producing desired result set

  1. #1
    Registered User
    Join Date
    10-31-2015
    Location
    India
    MS-Off Ver
    2013
    Posts
    8

    Programmatic Filter not producing desired result set

    Hi All,

    The workbook I am attaching has a sheet named "Filtered List". I am trying to use Data and Criteria in "Sheet1" and filtering data to Sheet("FilteredList"). The macro (FilterMe()) was working just fine until I deleted the named range "criteria" in Sheeet1 and renamed it again. I did not make any changes to the relavant macro.

    When the FilterBlock in "FilteredList" is left blank it must return 379 records, but now, it is returning just 160. Cant figure out the reason.

    Please help.

    Thanks
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Programmatic Filter not producing desired result set

    In the Sheet1 criteria range, you use formulas to copy the criteria from the FilterList criteria. Having a null string "" as criteria is not exactly the same as a blank cell. The null string excludes numbers where a truly blank cell does not. In column GD you have numeric values that are excluded because of the null string criteria.

    A quick fix is to have the macro copy the criteria instead of formulas.

    Please Login or Register  to view this content.
    Last edited by AlphaFrog; 06-18-2017 at 09:24 AM.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    10-31-2015
    Location
    India
    MS-Off Ver
    2013
    Posts
    8

    Re: Programmatic Filter not producing desired result set

    Thank u AlphaFrog, but ur suggestion does not work

  4. #4
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Programmatic Filter not producing desired result set

    Quote Originally Posted by mayoorsubbu View Post
    Thank u AlphaFrog, but ur suggestion does not work
    This worked for me using your example workbook.

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    10-31-2015
    Location
    India
    MS-Off Ver
    2013
    Posts
    8

    Re: Programmatic Filter not producing desired result set

    Thank u Alpha Frog for the help. The macro is working now.

+ 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. VBA Code producing 0 Result - Please Help
    By champaben in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-02-2017, 11:40 AM
  2. [SOLVED] Len function not producing the right result
    By Grilleman in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-20-2017, 06:02 PM
  3. Lookup producing unwanted result
    By Fasteddie68 in forum Excel General
    Replies: 3
    Last Post: 03-24-2016, 11:58 PM
  4. Summing military time is not producing desired result in a specific cell
    By seanpod in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-11-2015, 11:15 AM
  5. Macro no longer producing desired data
    By xforum142riidax in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-20-2011, 03:25 PM
  6. Macro no longer producing desired data
    By xforum142riidax in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-20-2011, 01:19 PM
  7. programmatic advanced filter
    By jmcfadyen in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-24-2006, 05:15 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