+ Reply to Thread
Results 1 to 5 of 5

Filter out rows where multiple values are the same.

  1. #1
    Registered User
    Join Date
    06-05-2010
    Location
    California
    MS-Off Ver
    Excel 2003
    Posts
    24

    Filter out rows where multiple values are the same.

    Say there was a table like this:


    . 1 2 3
    A x 2 a
    B y 7 b
    C x 2 c
    D x 3 d
    E z 6 e


    I want to filter out all rows for example where columns 1 & 2 in a row are the same as another row. So it would only show that row once. The end result would be like this:


    . 1 2 3
    A x 2 a
    B y 7 b
    C x 3 d
    D z 6 e


    How would I do that?

  2. #2
    Registered User
    Join Date
    06-05-2010
    Location
    California
    MS-Off Ver
    Excel 2003
    Posts
    24

    Re: Filter out rows where multiple values are the same.

    I attached a table with some misc data. The last row of the table should be hidden (not deleted) because columns 1 & 2 are the same as the first row.
    Attached Files Attached Files

  3. #3
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Filter out rows where multiple values are the same.

    Hey Johnny,

    I can't see the pattern. The row where C is is seems to have its data changed? It went from
    C x 2 c
    To
    C x 3 d
    Idon' understand how it can do that?
    Be fore warned, I regularly post drunk. So don't take offence (too much) to what I say.
    I am the real 'Napster'
    The Grid. A digital frontier. I tried to picture clusters of information as they moved through the computer. What did they look like? Ships? motorcycles? Were the circuits like freeways? I kept dreaming of a world I thought I'd never see. And then, one day...

    If you receive help please give thanks. Click the * in the bottom left hand corner.

    snb's VBA Help Files

  4. #4
    Registered User
    Join Date
    06-05-2010
    Location
    California
    MS-Off Ver
    Excel 2003
    Posts
    24

    Re: Filter out rows where multiple values are the same.

    The pattern is that the row where C was got deleted, the reason being because columns 1 & 2 on C were a duplicate with A.

    To give you a better idea of what I mean, excel actually has a built in function that does this, except it only works to remove rows, and not filter. Here is a screenshot of the built in function that they have:

    http://img215.imageshack.us/img215/9957/20911937.png

    But again, only works for removing, not filtering which is what I want.

  5. #5
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    Office 2021
    Posts
    2,237

    Re: Filter out rows where multiple values are the same.

    How about Advanced Filter,

    Insert 3 rows above the heading & use COUNTIFS in A2 like,

    =COUNTIFS(Table1[Column1],A5,Table1[Column2],B5)>1

    Then advanced filter, select the range, select criteria range as A1:A2

    See the attached.
    Attached Files Attached Files
    Regards,
    Haseeb Avarakkan

    __________________________________
    "Feedback is the breakfast of champions"

+ 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