Countif

anniemalec

Board Regular
Joined
Jul 9, 2010
Messages
53
Hello

I'm trying to write a formula to count cells c3,e3,g3 etc. but only if they contain a specific formula - i.e. "=count(b3)"

There's about 40cells I will need to count from.

I've tried =countif((c3.e3.g3 etc),="%count%","0") but is coming back incorrect.

Hope that makes sense...

Thanks in advance.
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Hi. Excel is not good at working out whether a cell contains a formula or not, and then using the result to drive another formula.
 
Upvote 0
If you have MOREFUNC downloaded, you could use FORMULATEXT in column D & then do your count in against column D
 
Upvote 0
No don't have that downloaded and can't install anything to this workstation due to the restrictions on my work network.

Can anyone think of anyway to get around it?
 
Upvote 0
Now trying to keep it simpler and only count if the cells have the value "1"

still struggling to get the syntax right however...

countif((CN3:CV3,CC3:CK3,BR3:BZ3,BA3:BO3,AJ3:AX3,S3:AG3,B3:P3)="1","0")

I now have too few functions.

Cheers.
 
Upvote 0
The basic syntax for COUNTIF is like this
Code:
=countif(cn3:cv3,1)
I'm not sure you can do it for multiple ranges, I'm certainly struggling with that.

But you could use
Code:
=countif(cn3:cv3,1)+countif(cc3:ck3,1)+....
Not elegant, but should work.
 
Upvote 0
Thats worked perfectly for that, thanks!

I'm now having difficulty with counting if between 2 values.

=COUNTIF($CN3:$CV3,">=2.5,<=4") but its coming back nil.

can't use a similar method as with previous formula as if i do each value is counted twice.
 
Upvote 0

Forum statistics

Threads
1,216,081
Messages
6,128,694
Members
449,464
Latest member
againofsoul

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