+ Reply to Thread
Results 1 to 5 of 5

Filtering out unwanted duplicate records

  1. #1
    Registered User
    Join Date
    09-02-2008
    Location
    Adelaide, South Australia
    Posts
    3

    Filtering out unwanted duplicate records

    Hi,

    I have been given some test result extract data from a database and am trying to find a way of filtering out some of the data that I do not need.

    As you can see in the example below, test 111111 was run twice in Cycle 1, but all that I am concerned about is the detail of the latest run.

    Column A Column B Column C Column D
    1 Test No. Cycle Status Test Id
    2 111111 Cycle 1 Passed 885654
    3 111111 Cycle 1 Failed 128766
    4 111111 Cycle 2 Passed 888900
    5 222332 Cycle 1 Passed 778787

    I am thinking that Advanced Filter might be the solution and would like to be able to filter the data that I want to another table. Unfortunately I am not sure how to achieve this.

    My logic would be:
    If a test number has occurs more that once in column A, and there is more than one occurance of a matching cycle is column B, then only display the record with the greatest Test Id. ie. 885654.

    Sorry if this is a little confusing, but any help would be appreciated.
    Am using MS Office 2003.

    Thanks
    Troy
    Last edited by troydk; 09-02-2008 at 08:22 AM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    I think you need to first add a helper column that tells you which rows are candidates for filtering...

    If you sample set is in A2:D5, then in E2 use formula:

    =D2=MAX(IF($A$2:$A$5=A2,IF($B$2:$B$5=B2,$D$2:$D$5)))

    adjust the ranges to ensure all data is captured.

    Then you must confirm the formula with CTRL+SHIFT+ENTER not just ENTER. You will see { } brackets appear.

    Then copy down.

    TRUE results mean this is the Maximum for the combination in Columns A & B.

    Then you can Autofilter for TRUEs and, if desired, copy/paste elsewhere.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    09-02-2008
    Location
    Adelaide, South Australia
    Posts
    3
    Thanks very much for the help NBVC.
    I tried your suggestion and it works a treat.

    One other question though if I may. On Sheet 2 I have created some Pivot Tables to display the results of this data.

    Without having to manually copy/paste the filtered data to a new location every time the results change, is there any way for me to make the Pivot Table look at only the rows with the TRUE value.

    Thanks again.
    Troy

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    If you include the TRUE/FALSE test in your pivot table rows, you can filter there for TRUE only.

  5. #5
    Registered User
    Join Date
    09-02-2008
    Location
    Adelaide, South Australia
    Posts
    3
    Thanks again NBVC.
    I ended up creating a small macro which autofilters to display True values, then copies the data to a new tab. That was I am linking my Pivot tables to clean data.

    Thanks very much for all your help.
    Troy

+ 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. How to Sum the Duplicate Records?
    By ramki in forum Excel General
    Replies: 2
    Last Post: 07-23-2012, 11:42 PM
  2. Create new worksheet based of duplicate records
    By Qppg in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-17-2011, 05:42 PM
  3. Eliminate Duplicate records
    By harshaputhraya in forum Excel General
    Replies: 2
    Last Post: 11-17-2007, 06:36 AM
  4. Duplicate check and delete for thousands of records
    By bufhal in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-18-2007, 03:04 PM
  5. Replies: 1
    Last Post: 01-17-2007, 11:50 PM

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