Count duplicates when there is more than one

RSnap3232

New Member
Joined
Nov 20, 2020
Messages
49
Office Version
  1. 2016
  2. 2013
Platform
  1. Windows
hello all,

after a formula that can work on the below example, I am working on putting together a report where there will be a list of locations and then next to that will be a name, I only need to know when a name is duplicated and how many duplications there are, as you can see below I have Bristol that is mentioned four times with two different names so the result would need to be one, whereas Swansea is mentioned four times but only one name is mentioned more than once so the result would be one, is this possible?
1735299427510.png
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Hello, how the count is supposed to proceed when a combination of the same location and name is mentioned more than 2 times?
 
Upvote 0
hello all,
apologies was a mistake on original post
after a formula that can work on the below example, I am working on putting together a report where there will be a list of locations and then next to that will be a name, I only need to know when a name is duplicated and how many duplications there are, as you can see below I have Bristol that is mentioned four times with two different names so the result would need to be two, whereas Swansea is mentioned four times but only one name is mentioned more than once so the result would be one, is this possible?
View attachment 120674
 
Upvote 0
Hello, how the count is supposed to proceed when a combination of the same location and name is mentioned more than 2 times?
apologies not sure what your asking for, i'm just curious if its possible to do a count for each location but only if the same name is mentioned more than once without the need of putting in what the name could be (as there could be a large number of names).
 
Upvote 0
Hello, the question was if e.g. John Smith is mentioned 4 times in relation to Bristol whether it does count as 1 case of a duplicity, i.e. irrespective of the number of times he is mentioned. The option below which relies on two helper columns (columns R and S) does so:

Excel Formula:
=IF(COUNTIFS($P$7:$P$18,P7,$Q$7:$Q$18,Q7)>1,1,0)

Excel Formula:
=IFERROR(R7/COUNTIFS($P$7:$P$18,P7,$Q$7:$Q$18,Q7,$R$7:$R$18,1),0)

Excel Formula:
=SUMIFS($S$7:$S$18,$P$7:$P$18,U7)
 
Upvote 0
Solution
Hello, the question was if e.g. John Smith is mentioned 4 times in relation to Bristol whether it does count as 1 case of a duplicity, i.e. irrespective of the number of times he is mentioned. The option below which relies on two helper columns (columns R and S) does so:

Excel Formula:
=IF(COUNTIFS($P$7:$P$18,P7,$Q$7:$Q$18,Q7)>1,1,0)

Excel Formula:
=IFERROR(R7/COUNTIFS($P$7:$P$18,P7,$Q$7:$Q$18,Q7,$R$7:$R$18,1),0)

Excel Formula:
=SUMIFS($S$7:$S$18,$P$7:$P$18,U7)
that is brilliant thank you kindly.
 
Upvote 0

Forum statistics

Threads
1,225,431
Messages
6,184,958
Members
453,270
Latest member
jgRSLCaUNQtW

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top