# Very weird problem, need help.

#### bomberman411

##### Board Regular
Hello all,

I have a weird problem that I can't figure out... might be a fluke in Excel, I just don't know.

In my spreadsheet, I have 3 different/separate cells to calculate totals that I need. All 3 checks the same long column for different things:

- one to check for zeros ("0") using
Code:
``=COUNTIF(\$F\$11:\$F\$5000;0)``
- one to check for question marks ("?) using
Code:
``=COUNTIF(\$F\$11:\$F\$5000;"?")``
- one to check for dashes ("-) using
Code:
``=COUNTIF(\$F\$11:\$F\$5000;"-")``

All of these use to work fine, but recently I have noticed something. When I add a "?", the total is incremented like it should. BUT if I write a "-", I have BOTH totals (total for the question marks & total for dashes) increment at the same time...? I really don't know what could be wrong.

### Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
The question mark is a wildcard with COUNTIF. To count the actual character you have to precede it with a tilde:

=COUNTIF(\$F\$11:\$F\$5000,"~?")

? is a wildcard, =COUNTIF(\$F\$11:\$F\$5000;"?") is counting all cells with a single character in them. Try =COUNTIF(\$F\$11:\$F\$5000;"~?")

Thank you very much guys...

I knew it had to be something like that, I suspected as much.
Thanks for letting me know.

Replies
4
Views
377
Replies
1
Views
197
Replies
6
Views
127
Replies
1
Views
161
Replies
10
Views
609

1,221,206
Messages
6,158,515
Members
451,497
Latest member
something68

### 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.

### Which adblocker are you using?

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

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