View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Pete_UK Pete_UK is offline
external usenet poster
 
Posts: 8,856
Default Using the Question Mark With COUNTIF

The ? character is used as a wildcard to match any single character.
You can use this syntax:

=COUNTIF(D11:D33,"~?")

to count the number of ? directly. The tilde symbol, ~, tells Excel to
treat the character that follows as a specific character rather than a
wildcard.

Hope this helps.

Pete

On Jan 21, 7:49*pm, "Thomas M." wrote:
Excel 2007

I have a small table that shows me the status of each item on the list. *The
status can be "Y", "N", "NA", or "?". *I am using the COUNTIF function to
tell me how many of each status is on the list. *For items with a status of
"?", which denotes an unknown status, I simply take the total number of
items on the list and subtract the sum of the other status values to arrive
at a count of items with an unknown status. *This works fine.

However, I am curious as to whether or not the "?" can be used with COUNTIF.
I've tried the following:

* * =COUNTIF(D11:D33,"=?")

Figuring that the question mark is a special character and that a special
syntax might be needed in order make Excel interpret it literally, I've
played around with different variations using single and double quotes, but
I've been unable to make the formula work.

Is it possible to use "?" with COUNTIF, and if so what is the correct
syntax?

Thanks for any help that you can offer.

--Tom