Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to COUNTIF "=#N/A" from a pivot table on another sheet?

I've been struggling with this for hours now. I have a pivot table that reads off of a data sheet which is ran by someone else who uses Vlookups. That's set in stone -_- So some of the results come back "#N/A" along with a bunch of other results.

I have a 3rd sheet that reads off the pivot table with a bunch of countifs, sums, etc. I'm trying to add a formula to that 3rd sheet that says something like "=COUNTIFS(PivotSheet!A:A, "=#N/A")"

However, everytime it counts it as 0. If I do a generic CountIF not blank, it will find every used cell. So its like it knows those cells have #N/A in them, but doesn't know that it is "#N/A".

I cannot get the formula to read it. I've also tried NA() and some other suggestions from other questions, but none seem to relate to this. Please help! Here's an attachment to help show my issue:

enter image description here

like image 539
Steven Avatar asked Oct 20 '25 20:10

Steven


2 Answers

If you are trying to count the instances of the error #N/A, then do this:

= COUNTIF(D3:D6,NA())

If you are trying to count the instances of the text #N/A, then do this:

= COUNTIF(D3:D6,"#N/A")
like image 59
ImaginaryHuman072889 Avatar answered Oct 22 '25 19:10

ImaginaryHuman072889


Use COUNT, IF and ISERROR

E.g. if your table range is A1:C3

=COUNT(IF(ISERROR(A1:C3),1,""))

What ISERROR does is treat errors as 1


Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!