How to identify duplicates using two criteria

Sean15

Well-known Member
Joined
Jun 25, 2005
Messages
567
Hello:


<b>Excel 2010</b><table cellpadding="2.5px" rules="all" style=";background-color: rgb(255,255,255);border: 1px solid;border-collapse: collapse; border-color: rgb(187,187,187)"><colgroup><col width="25px" style="background-color: rgb(218,231,245)" /><col /><col /><col /><col /><col /></colgroup><thead><tr style=" background-color: rgb(218,231,245);text-align: center;color: rgb(22,17,32)"><th></th><th>C</th><th>D</th><th>E</th><th>F</th><th>G</th></tr></thead><tbody><tr ><td style="color: rgb(22,17,32);text-align: center;">1</td><td style="font-weight: bold;;">Name</td><td style="font-weight: bold;text-align: right;;"></td><td style="font-weight: bold;;">Invoice No</td><td style="text-align: right;;"></td><td style=";">Duplicate invoice</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">2</td><td style=";">Peter Paul</td><td style="text-align: right;;"></td><td style="text-align: right;;">121245</td><td style="text-align: right;;"></td><td style=";">no</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">3</td><td style=";">PeterPaul</td><td style="text-align: right;;"></td><td style="text-align: right;;">121245</td><td style="text-align: right;;"></td><td style=";">yes</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">4</td><td style=";">Tiffany</td><td style="text-align: right;;"></td><td style="text-align: right;;">5675225</td><td style="text-align: right;;"></td><td style=";">yes</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">5</td><td style=";">Macy</td><td style="text-align: right;;"></td><td style="text-align: right;;">5675225</td><td style="text-align: right;;"></td><td style=";">no</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">6</td><td style=";">Tiffany</td><td style="text-align: right;;"></td><td style="text-align: right;;">5675225</td><td style="text-align: right;;"></td><td style=";">yes</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">7</td><td style=";">PeterPaul</td><td style="text-align: right;;"></td><td style="text-align: right;;">121245</td><td style="text-align: right;;"></td><td style=";">yes</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">8</td><td style=";">PeterPaul</td><td style="text-align: right;;"></td><td style="text-align: right;;">1524456</td><td style="text-align: right;;"></td><td style=";">No</td></tr></tbody></table><p style="width:4.8em;font-weight:bold;margin:0;padding:0.2em 0.6em 0.2em 0.5em;border: 1px solid rgb(187,187,187);border-top:none;text-align: center;background-color: rgb(218,231,245);color: rgb(22,17,32)">Sheet1</p><br /><br />


If name in column C and Invoice No in column E appears more than once, required result in column G should be "duplicate", if not "no"
so in example above, Tiffany invoice No 5675225 appears more than once, so required value in column G should be "duplicate"
Macy invoice No 5675225 should be tagged "No" (even though it has same invoice no as Tiffany)

Could you help please?

Sean
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
32,055
Office Version
365
Platform
Windows
How about
=IF(COUNTIFS($A$2:$A$8,A2,$C$2:$C$8,C2)>1,"duplicate","no")
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
32,055
Office Version
365
Platform
Windows
You're welcome
 

Forum statistics

Threads
1,081,680
Messages
5,360,498
Members
400,588
Latest member
SpannersWatson

Some videos you may like

This Week's Hot Topics

  • VBA (Userform)
    Hi All, I just would like to know why my code isn't working. Here is my VBA code: [CODE=vba]Private Sub OKButton_Click() Dim i As Integer...
  • List box that changes fill color
    Hello, I have gone through so many pages trying to figure this out. I have a 2020 calendar that depending on the day needs to have a certain...
  • Remove duplicates and retain one. Cross-linked cases
    Hi all I ran out of google keywords to use and still couldn't find a reference how to achieve the results of a single count. It would be great if...
  • VBA Copy and Paste With Duplicates
    Hello All, I'm in need of some input. My VBA skills are sub-par at best. I've assembled this code from basic research and it works but is...
  • Macro
    is it possible for a macro to run if the active cell value is different to the value above it
  • IF DATE and TIME
    I currently use this to check if date has passed but i also need to set a time on it too. Is it possible? [CODE=vba]=IF(B:B>TODAY(),"Not...
Top