+ Reply to Thread
Results 1 to 2 of 2

VBA equivalent of a filter that selects all values but one

  1. #1
    Registered User
    Join Date
    03-14-2013
    Location
    Milan
    MS-Off Ver
    Excel 2010
    Posts
    23

    VBA equivalent of a filter that selects all values but one

    Hi all

    I need a macro that from a column of values selects all rows but the one showing a given value (so the rows associated with that value are not selected). Keep in mind that all the other values change from time to time, so it cannot be expressed in terms of "choose 1, 2, 3 and 5" (which is what I get recording the macro) but I need to express it as in "select all but 4" (where 4 is the only one that is always present and needs to be excluded).

    Hope the above was clear...

    Thank you in advance

  2. #2
    Forum Expert Colin Legg's Avatar
    Join Date
    03-30-2008
    Location
    UK
    MS-Off Ver
    365
    Posts
    1,256

    Re: VBA equivalent of a filter that selects all values but one

    You can use the Range.ColumnDifferences() method to do this. A simple example:
    Please Login or Register  to view this content.
    Hope that helps,

    Colin

    RAD Excel Blog

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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