+ Reply to Thread
Results 1 to 7 of 7

unique data

Hybrid View

  1. #1
    Valued Forum Contributor Blake 7's Avatar
    Join Date
    10-01-2010
    Location
    Bogota, Colombia
    MS-Off Ver
    Excel 2010 64 bit and Excel 2007,
    Posts
    1,377

    unique data

    Dear Community, good afternoon from a wet cold London.

    Thanks for taking the time to look at this post.

    I have found myself at the mercy of Excel again..........

    Please find attached a spreadsheet.

    In the sheet entitled "Sorted by cc & s" which is already sorted in the following order:

    course code (ascending) followed by starts (descending)

    I would like to unique the data on course code, that is extract all data, Cols A to Q but only for course codes where the starts are the highest.

    I.e, if a course code appears 3 times extract only data where the number of starts (Col H) is highest.

    Therefore, I would like to be left with a list of unique course codes with the HIGHEST nuber of starts (col H)

    Thanks all.

    Darren
    Attached Files Attached Files
    Last edited by Blake 7; 11-08-2010 at 12:47 PM.
    Blake 7

    If your question has been answered, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

    If any member's response has helped to solve your problem, please consider using the scales icon on the top right of their post to show your appreciation.

    http://failblog.org/

  2. #2
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: unique data

    Hi Darren

    no file attached...

  3. #3
    Valued Forum Contributor Blake 7's Avatar
    Join Date
    10-01-2010
    Location
    Bogota, Colombia
    MS-Off Ver
    Excel 2010 64 bit and Excel 2007,
    Posts
    1,377

    Re: unique data

    Hey Arthur... thanks! darn cold weather!! playing with my bones.

  4. #4
    Valued Forum Contributor Blake 7's Avatar
    Join Date
    10-01-2010
    Location
    Bogota, Colombia
    MS-Off Ver
    Excel 2010 64 bit and Excel 2007,
    Posts
    1,377

    Re: unique data

    Ok Guys - I'm getting the feeling that something is not right with this post........!

    23 hits and still no result!

    I sense that I may have to approach this one in a different way!

    How about a formula to Highlight every duplicate but not the first instance, that way I can sort by colour?

    maybe something like =if(countif(a2:a30001,a2)=1, false, not (countif(a2:a3000,a2)=1))

    Any feedback appreciated, even if its a comment or observation on the wording or title of my first post.

    Cheers

  5. #5
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,899

    Re: unique data

    Hey, buddy, we can't leave you hanging like that!

    One small problem is that your Exp End Year column is text instead of date format. You can't determine the max date from this format.

    Here is a bit of a quick & dirty solution. Here is what I did:
    Did a global change to your date field to make it an actual date, i.e., change 08/09 to 8/1/2009 (American style). Reformatted using Custom mm/yy.

    Created a new column at far left to be a "key" that is unique for each row. This key is the concatenation of the course code and the date. The key will show the date as an integer. (This is also called a "helper column" because it gives an intermediate result used later.)

    Made this whole block of data a named range.

    Created a pivot table. Row labels are course codes. The only column is the date. Changed field options to show Max date. (Shown as an integer.) Now the pivot table shows each course code once, with the latest date.

    Add a column after the pivot table to create a key from the pivot table (course code plus date, same as above).

    Use VLOOKUP to look up the key generated by the pivot table to match the key in the named range. Repeat for all columns and rows.
    How often does the data change? If you update your course data you will have to make sure that the Key column is extended for all rows. Your pivot table will be to be refreshed, and the Key column for the pivot table and all the lookup columns also extended for all rows in the pivot table.

    I could not think of a way to do this without helper columns and the pivot table, though one may exist. I could have solved it using VBA but prefer this solution.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  6. #6
    Valued Forum Contributor Blake 7's Avatar
    Join Date
    10-01-2010
    Location
    Bogota, Colombia
    MS-Off Ver
    Excel 2010 64 bit and Excel 2007,
    Posts
    1,377

    Re: unique data

    Many thanks Jazz for taking the time to help me out, I appreciate that it was a bummer of a post.... 23 views and no response proved that, so a big thank you!

    I still find it hard to belive that the Advanced Filter - Unique Records Only function does not work for more than one column! crazy..........

    Or maybe I was doing something wrong..... more likely!

    All the best.

+ 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