Why does COUNTIF think "?" is in the criteria when its actually not.

marlina

New Member
Joined
Apr 17, 2018
Messages
24
i am trying to count total numbers in this:

12/11/1991?

with this formula:

=SUMPRODUCT(COUNTIF(Isdigt3,MID(C9,ROW(1:50),1)))

where Isdigt3 is range containing 0,1,2,3,4,5,6,7,8,9,/,

it should return 10. but it returns 11.

I don't have "?" in my range
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
? is a wildcard meaning any single character. To escape it you need to use ~?, so use:

=SUMPRODUCT(COUNTIF(Isdigt3,SUBSTITUTE(MID(C9,ROW(1:50),1),"?","~?")))
 
Upvote 0
Hi!

You can try the Array Formula (use Ctrl+Shift+Enter to enter the formula) below too:

=COUNT(SEARCH(Isdigt3,MID(C9,ROW(1:50),1)))

Or the Normal Formula below

=COUNT(INDEX(SEARCH(Isdigt3,MID(C9,ROW(1:50),1)),))

Markmzz
 
Last edited:
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

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
Back
Top