Is error help using counta

twinpowr

Board Regular
Joined
Mar 14, 2007
Messages
73
Hi i am having problems intergrating iserror with this formula

Code:
=IF(COUNTA(H25:K25)="","n/a",COUNTIF(H25:K25,"a")/COUNTA(H25:K25))

i can get it to work with other formulas eg average etc but can't seem to get this to work

any help would be aprrecieated.

Alistair.
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
COUNTA returns a number not null. Maybe you need:

=IF(COUNTA(H25:K25)=0,"n/a",COUNTIF(H25:K25,"a")/COUNTA(H25:K25))
 
Upvote 0
Counta returns a number (the count of non empty cells).
So counta will never = ""..

Try

=IF(COUNTA(H25:K25)=0,"n/a",COUNTIF(H25:K25,"a")/COUNTA(H25:K25))
 
Upvote 0
Hi Guys

thanks for the help, of course easy when you know how put me on the right track here is what i used

Code:
=IF(COUNTA(H25:K25)=0,"",COUNTIF(H25:K25,"a")/COUNTA(H25:K25))

I added the 0 as you suggested then simply removed the n/a and replaced with "" and that gave me the blank i was looking for.

Thanks again, you guys are the best.

Alistair
 
Upvote 0

Forum statistics

Threads
1,223,231
Messages
6,170,884
Members
452,364
Latest member
springate

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