if error with countifs() need to return #N/A

bloodybrit90

Board Regular
Joined
Jul 18, 2011
Messages
111
Hey guys the two formulas below are returning 0 if there is not a value. I have used this formula with median(if()) and average(if()) and it works. Any help will be greatly appreciated.

=IFERROR(COUNT(IF('Both MLS RS'!$BE$33:$BE$10000>='Zipcode Analysis'!$N2,IF('Both MLS RS'!$BE$33:$BE$10000<='Zipcode Analysis'!$O2,IF($A$3='Both MLS RS'!$FH$33:$FH$10000,'Both MLS RS'!$A$33:$A$10000)))),NA())

=IFERROR(COUNTIFS('Both MLS RS'!$BE$33:$BE$10000,">="&$N2,'Both MLS RS'!$BE$33:$BE$10000,"<="&$O2,'Both MLS RS'!$FG$33:$FG$10000,"yes",'Both MLS RS'!$FH$33:$FH$10000,"="&'Zipcode Analysis'!$A$3,'Both MLS RS'!$A$33:$A$10000,">0"),NA())
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
I have tried this unsucessfully.

=IF(COUNTIFS("=0",NA(),COUNTIFS('Both MLS RS'!$BE$33:$BE$10000,">="&$C2,'Both MLS RS'!$BE$33:$BE$10000,"<="&$D2,'Both MLS RS'!$FG$33:$FG$10000,"yes",'Both MLS RS'!$FH$33:$FH$10000,"="&'Zipcode Analysis'!$A$2,'Both MLS RS'!$A$33:$A$10000,">0")))
 
Upvote 0
Hi,

I am not sure what exactly you are looking for.

I understand that you want to display #NA if COUNTIFS returns 0.

If yes, then try..

=IF(COUNTIFS(.....)=0,"#NA",COUNTIFS(.......))

jai
 
Upvote 0
I need to return #N/A so that a graph will not display the 0's when I have a range highlighted to graph. If you know of a better way please advise.
Cheers
 
Upvote 0
HI

Not sure if this will work, but give it a try.

=IFERROR(IF(COUNT(IF('Both MLS RS'!$BE$33:$BE$10000>='Zipcode Analysis'!$N2,IF('Both MLS RS'!$BE$33:$BE$10000<='Zipcode Analysis'!$O2,IF($A$3='Both MLS RS'!$FH$33:$FH$10000,'Both MLS RS'!$A$33:$A$10000))))=0,NA()),NA())

=IFERROR(IF(COUNTIFS('Both MLS RS'!$BE$33:$BE$10000,">="&$N2,'Both MLS RS'!$BE$33:$BE$10000,"<="&$O2,'Both MLS RS'!$FG$33:$FG$10000,"yes",'Both MLS RS'!$FH$33:$FH$10000,"="&'Zipcode Analysis'!$A$3,'Both MLS RS'!$A$33:$A$10000,">0")=0,NA()),NA())

Vidar
 
Upvote 0
Could you upload the workbook to Dropbox or some other online storage sites,
so we could take a look at it?
 
Upvote 0
Try this version to get #N/A instead of zero

=IFERROR(1/(1/COUNTIFS('Both MLS RS'!$BE$33:$BE$10000,">="&$N2,'Both MLS RS'!$BE$33:$BE$10000,"<="&$O2,'Both MLS RS'!$FG$33:$FG$10000,"yes",'Both MLS RS'!$FH$33:$FH$10000,"="&'Zipcode Analysis'!$A$3,'Both MLS RS'!$A$33:$A$10000,">0")),NA())
 
Upvote 0

Forum statistics

Threads
1,216,084
Messages
6,128,722
Members
449,465
Latest member
TAKLAM

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