• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 595
  • Last Modified:

Using CountIf for duplicates

Hi Folks
Just wanted to check if I'm on track with this solution. I have a file with 6 columns and I'm not sure if I have duplicates or not. My workaround has been to create a new field, which concatenates all the elements of each transaction and then uses conditional formatting to flag those which are duplicates. It seems to work :-) but should I also use a Count if with this to check and if so, how would I structure it?
Thanks
0
agwalsh
Asked:
agwalsh
2 Solutions
 
p_nutsCommented:
in excel 2007 and above you have the option to remove duplicates. this will also count them if it's a one off this is the fasted way.
0
 
regmigrantCommented:
this approach will work as long as you consider a duplicate to be when all columns are identical and in the same order.

to use countif to count the number of times a particiular value repeats in column A (for example) is to put the following in column B and copy down:-

=Countif($a$1:$a1, $a1)

Not the 'missing' dollar sign on the second part of the range.

If you have sorted column A you will find that column b now has a 1 for non-identical (first match) and then 2,3,4 etc for subsequent matches.

Hope this helps

Reg
0
 
Rob HensonFinance AnalystCommented:
If your data is sorted you can use a simple formula in H (assumed A _ F data, G concatenated):

=G1=G2  to get a TRUE or FALSE for duplicates.

If not sorted then:

=COUNTIF(G:G,G1)

copy down, will return number of entries same as reference cell. Apply autofilter to column and show those where greater than 1.

How are you applying the Conditional Formatting? I assume you are using a formula to apply formatting.

In Excel 2007 and later there is a Show Dulicates option on the Data ribbon.

Thanks
Rob H
0
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

 
agwalshAuthor Commented:
@RobHenson - will try that. Yes, I'm using the Show duplicates option :-) Thank you!
A
0
 
ukerandiCommented:
Please check the attachment for your query
The ID Filed Enter your suspicious duplicate data, then Click on Run then you can find how many records are duplicates, for example more than 2 time all are duplicates
Run.xls
0
 
agwalshAuthor Commented:
Thank you all very much!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now