Formula To Check for Duplicates excluding 0 and empty cells

APML

Board Regular
Joined
Sep 10, 2021
Messages
216
Office Version
  1. 365
Hi all, I have a range C2:C51. I would like a formula that tells me if there are any duplicates excluding empty cells or 0.
Note cells C2 to C51 have the following formula in them
C2=Watch!$B$11
C3=Watch!B38
ect
So I'm wanting to check the outcomes of the formulas.
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
D2:
Excel Formula:
=IF(AND(C2<>"",C2<>0,COUNTIF($C$2:$C$51,C2)>1),"There are duplicates", "")
 
Upvote 0
D2:
Excel Formula:
=IF(AND(C2<>"",C2<>0,COUNTIF($C$2:$C$51,C2)>1),"There are duplicates", "")
Thx for your help but I did try that and it doesn't work. It may just be looking at the formulas in the range which are all different, but when the formula returns the same answer then it doesn't seem to recognise it as a duplicate
 
Upvote 0
Try this:
Excel Formula:
=IF(AND(C2<>"",C2<>0),IF(COUNTIF($C$2:$C$51,C2)>1,"There are duplicates","Unique value"), "")
 
Upvote 0
Thx for your help but I did try that and it doesn't work. It may just be looking at the formulas in the range which are all different, but when the formula returns the same answer then it doesn't seem to recognise it as a duplicate
Sorry got that wrong, it doesn't work but not for the reason I said. For some reason sometimes it's counting the 0 as duplicates other time it isn't
 
Upvote 0
Can you load some of the data you are working with using the XL2BB addin, it makes resolving issues like this easier
 
Upvote 0
How about
Excel Formula:
=IF(MAX(COUNTIFS(C2:C51,C2:C51,C2:C51,"<>0"))>1,"Duplicates","Ok")
 
Upvote 0
Solution

Forum statistics

Threads
1,215,474
Messages
6,125,024
Members
449,204
Latest member
LKN2GO

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