Countifs Distrinct Formula issue
I have a Countifs formula that I want to count a bunch of cells (just list of numbers) but exclude two specific numbers and return a total value of unique cells. This formula works when only excluding one but not when excluding two. Anyone have an idea on my error or different formula that would generate the correct answer. The formula that works is: =COUNTIFS(DISTINCT([1st]375:[31st]404), "<>0") I would like to exclude 0 and 786. I tried just adding "<>786" also copping range and adding other exclusion with no success.
Best Answer

=COUNTIFS(DISTINCT([1st]375:[31st]404), <>0, DISTINCT([1st]375:[31st]404), <>786)
Answers

=COUNTIFS(DISTINCT([1st]375:[31st]404), <>0, DISTINCT([1st]375:[31st]404), <>786)

Carlson thanks for the reply. I tried that Formula and got a zero back when previous result was 17. So answer should just be one less. Also tried adding "" with no luck

Perhaps the numbers are formatted as text?
=COUNTIFS(DISTINCT([1st]375:[31st]404), <> "0", DISTINCT([1st]375:[31st]404), <> "786")

Nevermind...I had a typo miss a ). Thank you
Help Article Resources
Categories
Check out the Formula Handbook template!