+ Reply to Thread
Results 1 to 2 of 2

Test for no valid criteria in autofilter

  1. #1
    Forum Contributor
    Join Date
    11-14-2007
    Posts
    142

    Test for no valid criteria in autofilter

    I have a couple of lines of code that looks something like:
    Please Login or Register  to view this content.
    The range rDeletion is set to the whole of the autofilter data range (excluding headers), and the effect of the two lines of code is intended to delete any rows that have the value TRUE in the cell in column 44.

    This works fine EXCEPT where there are NO values of TRUE contained in column 44, in which case the (undesired) effect is that it deletes all rows where the intention is that it should delete none.

    How should I get around this, please?

  2. #2
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Test for no valid criteria in autofilter

    You could test for true values with a simple count before running the filter:
    Please Login or Register  to view this content.
    Palmetto

    Do you know . . . ?

    You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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