Countifs with one of the columns containing #N/As

Greatheights

New Member
Joined
Mar 14, 2013
Messages
31
On sheet "Data2" Column A has the name of the Underwriter that saw a case (with repeated values), and column J has the name of the Doctor that the case was referred to. Many cases don't get referred to doctors, so those rows have a #N/A instead of the Doctor's name. (the Doctors names are entered with a vlookup from another sheet.)

On sheet "Charts", I've got a list of the Underwriters names (also in column A, starting in row28), and the total count of cases they saw. I'm tring to get a count of the cases those underwriters saw that were also referred to a doctor, so that I can ultimately calculate the ratio.

I'm a little shaky on how to use the IsNA or IsError functions. Also new to array formulas.

This is what I tried (formula is in sheet "Charts"):

<CODE>{=IF(--(ISNA(Data2!J:J)),,(--COUNTIF(Data2!A:A,$A28)))}</CODE>

This ended up giving me the same result as my formula to just count the number of cases the underwriter saw:

<CODE>=COUNTIF(Data2!$A:$A, $A28)</CODE>

That doesn't make any sense to me.

I also tried this, but Excel wouldn't even accept it as a valid function:

<CODE>{=COUNTIFS(Data2!$A:$A, $A28, IsNA(Data2!$J:$J), False))}</CODE>

Am I even taking the right approach? Any help would be great. Let me know if I need to clarify anything.
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
It would be better to adjust the Vlookup that is returning #N/A.

=IF(ISNA(VLOOKUP(...)),"",VLOOKUP(...))

then your countif will work as normal.
 
Upvote 0
Oh man, that was deceptively simple. I didn't realize you could just put #N/A into a formula like that. This worked perfectly, thanks.
 
Upvote 0

Forum statistics

Threads
1,214,829
Messages
6,121,826
Members
449,051
Latest member
excelquestion515

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