+ Reply to Thread
Results 1 to 8 of 8

Identifying last record (de-duping)

  1. #1
    Registered User
    Join Date
    05-19-2008
    Posts
    56

    Identifying last record (de-duping)

    Apologies as this will be a bit rushed and no attachment example, but it's quite a straightfoward query (which I've performed before but my mind has gone blank).

    I have a file of customer queries dealt with by a particular member of staff from our database. Some of them have multiple entries, if they have been passed to that member of staff more than once. Every time it is allocated to another member of staff, the record is annotated with a sequential 'Log' number. So the first few records read as follows (Enquiry number and log number only)

    Enquiry Number log
    19 1
    19 2
    186 5
    187 1
    187 2
    187 3
    187 4
    187 5
    206 1
    206 2
    206 3

    I wish to identify the last time each one was allocated to this member of staff, so I would end up with:

    19 2
    186 5
    187 5
    206 3

    What's the easiest way?

    Thanks

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Identifying last record (de-duping)

    Push your data into a Pivot Table - set Enquiry Number as Row Field and Log as Data Field set to MAX ... that will generate your matrix for you (in about 5 secs!)

  3. #3
    Forum Expert darkyam's Avatar
    Join Date
    03-05-2008
    Location
    Houston, TX
    MS-Off Ver
    2013
    Posts
    2,191

    Re: Identifying last record (de-duping)

    Another way would be to use
    =LOOKUP(2,1/($A$1:$A$11=D1),$B$1:$B$11), where D1 has the first of your unique values list from A.

  4. #4
    Registered User
    Join Date
    05-19-2008
    Posts
    56

    Re: Identifying last record (de-duping)

    Great, that's given me what I wanted in terms of unique id and last log. Next question, I have other columns which I didn't include on the example. Can I incorporate these onto my pivot table or will I have to take the data from the pivot table and do a look up on my original sheet?
    Thanks

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Identifying last record (de-duping)

    You'll need to elaborate on

    a) what those "columns" are exactly

    b) what you want to do with a)

  6. #6
    Registered User
    Join Date
    05-19-2008
    Posts
    56

    Re: Identifying last record (de-duping)

    Quote Originally Posted by DonkeyOte View Post
    You'll need to elaborate on

    a) what those "columns" are exactly

    b) what you want to do with a)
    I've attached 2 files, a test one and test results, to show what I want to return.

    Thanks
    Attached Files Attached Files

  7. #7
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Identifying last record (de-duping)

    see attached (sheet DO) ... change in principle in so far as all fields are added to PT, the Log field is used twice - as it used in Data Field also - set to SUM.

    A filter is then applied to LOG Row Field to display Top 1 Item based on SUM of Log.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    05-19-2008
    Posts
    56

    Re: Identifying last record (de-duping)

    Great, I'll have a go at that
    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