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

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)

Dannyh1

Well-known Member
Joined
Nov 18, 2009
Messages
1,144
Hi

how about in another column try

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

Then sum that column
 

MrKowz

Well-known Member
Joined
Jun 30, 2008
Messages
6,653
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Welcome to the forums!

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

=SUMPRODUCT(--(ISERROR(SEARCH(" ",range))))
 

VoG

Legend
Joined
Jun 19, 2002
Messages
63,650
Hi. One way

=SUMPRODUCT(--(LEN(A1:A4)=LEN(SUBSTITUTE(A1:A4," ",""))))
 

texasalynn

Well-known Member
Joined
May 19, 2002
Messages
8,458

ADVERTISEMENT

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
 

barry houdini

MrExcel MVP
Joined
Mar 23, 2005
Messages
20,825
To avoid counting blank cells.....

=SUMPRODUCT(ISERR(FIND(" ",range))*(range<>""))
 

beefasaurus

New Member
Joined
Mar 7, 2011
Messages
4

ADVERTISEMENT

Welcome to the forums!

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

=SUMPRODUCT(--(ISERROR(SEARCH(" ",range))))

Thanks very much, this works great! Much appreciated!
 

barry houdini

MrExcel MVP
Joined
Mar 23, 2005
Messages
20,825
Obviously it needs a specific range like

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

What result do you get, error or wrong count?
 

DonkeyOte

MrExcel MVP
Joined
Sep 6, 2002
Messages
9,123
Another possibility might be:

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

this would also disregard entries other than text
 

Forum statistics

Threads
1,141,019
Messages
5,703,763
Members
421,315
Latest member
awaisnazir139

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
Top