Home > database >  Google Sheets - Use "?" to found the symbol in a cell
Google Sheets - Use "?" to found the symbol in a cell

Time:02-03

I am trying to count the number of cells that contain the symbol "?" in a specific range.

But the formula =COUNTIF(C3:C60; "?") seems to interpret the char as 'any string with one char'.

I tried with "\?", "'?" and "'?'".

I tried this solution too : =SUM(IF(A2:A10="?"; 1; 0))

Is there an other solution to escape the char and just take it as it is ?

CodePudding user response:

The wildcard escape character for COUNTIF as per the function help page is a tilde:

=COUNTIF(C3:C60;"~?")

CodePudding user response:

try regex it:

=SUMPRODUCT(REGEXMATCH(C3:C60; "\?"))
  • Related