3

I can use =countif() to find cells with special characters. For example, If I'm looking for cells with '!' I can use =countif("*!*").

How do I do this if I'm looking for cells with '"' (double quotes).

I tried the following but they don't work:

=countif("*"*")
=countif("*~"*")
=countif(~"*"*")
val
  • 1,629
  • 1
  • 30
  • 56

3 Answers3

5

You can use double double quotes like this: "abc""def" to create the string abc"def

=COUNTIF(A:A,"*""*")
stenci
  • 8,290
  • 14
  • 64
  • 104
  • 2
    It is sad to see this correct answer downvoted. [`Char(34)`](http://stackoverflow.com/a/36896168/11683) is not *the* way, it's *a* way, and arguably, it does you more harm than good if you don't know how to escape quotes. – GSerg Apr 27 '16 at 17:09
5

Easy:

=COUNTIF(A:A,"*" & CHAR(34) & "*")

enter image description here

and if you wanted to count cells with a pair of double-quotes:

=COUNTIF(A:A,"*" & CHAR(34)  & CHAR(34)& "*")

You can modify this to count "problem" cells, like cells containing CHAR(160),etc.

Gary's Student
  • 95,722
  • 10
  • 59
  • 99
0

Try this:

If you are looking for":

=COUNTIF(Range,"*"&CHAR(34)&"*")

If you are looking for "":

=COUNTIF(Range,"*"&CHAR(34)&CHAR(34)&"*")
Mrig
  • 11,612
  • 2
  • 13
  • 27