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.
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Hi

how about in another column try

=IF(ISERROR(FIND(" ",A1)),"",1)

Then sum that column
 
Upvote 0
Welcome to the forums!

Assuming words are separated with a space, we can handle this with a SUMPRODUCT:

=SUMPRODUCT(--(ISERROR(SEARCH(" ",range))))
 
Upvote 0
Hi. One way

=SUMPRODUCT(--(LEN(A1:A4)=LEN(SUBSTITUTE(A1:A4," ",""))))
 
Upvote 0
will this work
Excel Workbook
BE
2abc 123TRUE
3abcFALSE
Sheet3
Excel 2003
Cell Formulas
RangeFormula
E2=ISNUMBER(FIND("|",SUBSTITUTE(B2," ","|")))
E3=ISNUMBER(FIND("|",SUBSTITUTE(B3," ","|")))


then you could do a count of the True
 
Upvote 0
Obviously it needs a specific range like

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

What result do you get, error or wrong count?
 
Upvote 0
Another possibility might be:

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

this would also disregard entries other than text
 
Upvote 0

Forum statistics

Threads
1,224,618
Messages
6,179,916
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