Countif cells that contain only one word

beefasaurus

New Member
Joined
Mar 7, 2011
Messages
4
Hello,

I am trying to come up with a way to create a formula that counts if any cell in a range contains one word. Is there a wildcard than can be used with countif that would allow me to specify a word count? Right now I am using =COUNTIF(range,"*"), which is the wrong wildcard. Cells with multiple words would not be counted.

Thanks in advance.
 
Obviously it needs a specific range like

=SUMPRODUCT(ISERR(FIND(" ",A1:A10))*(A1:A10<>""))

What result do you get, error or wrong count?

Yes, I have entered the named range in both areas. I get #VALUE error.

The formula I am entering is =SUMPRODUCT(ISERR(FIND(" ",shows))*shows<>"")
 
Upvote 0

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Try:

=SUMPRODUCT(--(ISERR(FIND(" ",shows))),--(shows<>""))
 
Upvote 0
@beefasaurus, if you compare your version above to Barry Houdini's you'll note some missing parentheses, ie:

Code:
=SUMPRODUCT(ISERR(FIND(" ",shows))*(shows<>""))

Regards the two COUNTIFs suggestion

Code:
=SUM(COUNTIF(shows,{"*","* *"})*{1,-1})

or if using XL2007+

Code:
=COUNTIFS(shows,"*",shows,"<>* *")

I guess I'd argue the COUNTIF(S) approach to be the more robust but others will no doubt prove otherwise ;)
 
Upvote 0

Forum statistics

Threads
1,224,621
Messages
6,179,938
Members
452,949
Latest member
beartooth91

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