# Thread: Countif and not (2003)

1. ## Countif and not (2003)

Need a formula that counts how many cells have text in them, but either excludes or subtracts any cells with the word "restroom" in them.

Thanks again

2. ## Re: Countif and not (2003)

Does this do what you want?

<code>
=COUNTA(A1:A10)-COUNTIF(A1:A10,"*restroom*")
</code>

3. ## Re: Countif and not (2003)

The formulas below assume that A1:A10 is the range you're interested in. Adapt as needed.

What exactly do you mean by "have text in them"? That the cells are not empty? If so, try

=COUNTA(A1:A10)-COUNTIF(A1:A10,"Restroom")

Or do you mean text as distinct from numbers, dates etc.? If so, try

=SUMPRODUCT(ISTEXT(A1:A10)*1)-COUNTIF(A1:A10,"Restroom")

4. ## Re: Countif and not (2003)

Wow - how brain-dead am I? That's exactly what I said in my question - duh.

Sorry

AuntLinda

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•