Consulting

Results 1 to 7 of 7

Thread: How to find the last duplicate value

  1. #1
    VBAX Regular
    Joined
    May 2008
    Posts
    48
    Location

    How to find the last duplicate value

    What formula should I use based on the example below?

    I want to find the last duplicate value/or single value in the part column and bring over the adjacent column value as well.

    Attachment 9148

    Thank you,

  2. #2
    Moderator VBAX Guru Simon Lloyd's Avatar
    Joined
    Sep 2005
    Location
    UK
    Posts
    3,003
    Location
    In your example why do you have FIND next to the cells? and find the value where?, you mention duplicates but in your example there are none that have the same part name e.g Value F is 5 there is another 5 but it belongs to Value G. You need to explain further what you are trying to achieve and what the expected outcome is and where!
    Regards,
    Simon
    Please read this before cross posting!
    In the unlikely event you didn't get your answer here try Microsoft Office Discussion @ The Code Cage
    If I have seen further it is by standing on the shoulders of giants.
    Isaac Newton, Letter to Robert Hooke, February 5, 1675 English mathematician & physicist (1642 - 1727)

  3. #3
    VBAX Regular
    Joined
    May 2008
    Posts
    48
    Location
    I'm not sure of the proper way to describe what I need. However, I'll give it another shot.

    Name(Column A) Accounts(Column B)
    MUM 5
    MUM 25
    MUM 15 ---------- this is a line I need to find
    Shand 7
    Shand 2 ---------- Another line I need to find
    Morhand 6---------- Another line I need to find

    (Keep in mind the Numbers next to each Name(Column A) are in a separate column B)

    I'm trying to create a formula(or any other method) in column C to find the last duplicate value or single value in colum A and move that value along with the adjacent cell (Column B) to Column C.

    So using the above method Column C would read:

    MUM 15
    Shand 2
    Morhand 6

    The other values would be elminated.

    I'm probably still not making any sense, however any help would be greatly appreciated

  4. #4
    Moderator VBAX Guru Simon Lloyd's Avatar
    Joined
    Sep 2005
    Location
    UK
    Posts
    3,003
    Location
    What criteria are you using to find Mum 15 instead of Mum 5? is the name in one column and the number in another? are they always in order i.e all the Mum's all the Shand's etc?
    Regards,
    Simon
    Please read this before cross posting!
    In the unlikely event you didn't get your answer here try Microsoft Office Discussion @ The Code Cage
    If I have seen further it is by standing on the shoulders of giants.
    Isaac Newton, Letter to Robert Hooke, February 5, 1675 English mathematician & physicist (1642 - 1727)

  5. #5
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    G1: =A1
    G2: =IF(ISERROR(MATCH(0,COUNTIF(G$1:GB1,$A$1:$A$200&""),0)),"",
    INDEX(IF(ISBLANK($A:$A),"",$A$1:$A$200),MATCH(0,COUNTIF(G$1:G1,$A$1:$A$200& ""),0)))

    G2 is an array formula, copy down as afra as you think you might need

    H1: =IF(G1="","",INDEX(B:B,MAX(IF(A1:A20=G1,ROW(A1:A20)))))

    also an array formula, and copy down as far as the G column
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  6. #6
    Moderator VBAX Guru Simon Lloyd's Avatar
    Joined
    Sep 2005
    Location
    UK
    Posts
    3,003
    Location
    As always Bob
    Regards,
    Simon
    Please read this before cross posting!
    In the unlikely event you didn't get your answer here try Microsoft Office Discussion @ The Code Cage
    If I have seen further it is by standing on the shoulders of giants.
    Isaac Newton, Letter to Robert Hooke, February 5, 1675 English mathematician & physicist (1642 - 1727)

  7. #7
    VBAX Regular
    Joined
    May 2008
    Posts
    48
    Location
    Thank you both so much!!!!!

    Amazing!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •