+ Reply to Thread
Results 1 to 3 of 3

Macro to filter certain values in a column and delete the rest

  1. #1
    Registered User
    Join Date
    10-14-2010
    Location
    Minnesota
    MS-Off Ver
    Excel 2003
    Posts
    23

    Macro to filter certain values in a column and delete the rest

    Since Excel 2003 only allows for custom filtering of two values, I am looking for the easiest way to filter more than two values. In the attached dummy data, say I wanted to filter on numbers 2,5, and 7 in column 1, and delete the rows that do not meet that criteria, what is the best way to do this? I'm sure a macro would work, or maybe a simple logic match statement?

    Thanks for your help.
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Macro to filter certain values in a column and delete the rest

    A non-macro approach would be to put this formula in column E, sort by E and delete all the 1s:

    =IF(OR(A2=2,A2=5,A2=7),"",1)

  3. #3
    Registered User
    Join Date
    10-14-2010
    Location
    Minnesota
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: Macro to filter certain values in a column and delete the rest

    That works. Thanks!

+ 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