Using COUNTIF(range,"<>") can I count non-empty cells and with COUNTIF(range,"~?") or COUNTIF(range,"~*") can I calculate the number of cells matching a wildcard character, but can I do it with one COUNTIF() ?
COUNTIF(range,"<>~?") does not work.
My understanding here is that you want to count cells in a range that satisfy two conditions – 1) they are not blank, 2) they are not “?”
If you are using Excel 2007 or later try COUNTIFS (with an “S” on the end) with both conditions like this
=COUNTIFS(range,"<>",range,"<>~?")or for earlier versions use SUMPRODUCT
=SUMPRODUCT((range<>"")*(range<>"?"))[Note: you don’t need ~ in the latter]
In Excel 2003 or earlier range can’t be a whole column. You can use the same approach for *