This is a tricky one I am stuck on. In Excel 2010 I want to search a string for the character "
. I am using the formula
=FIND(A1,"text", 1)
which will return a number (starting position) of "text" in A1 string, or an error if not found.
How to search for "
in the formula?
Thanks for the advice!
The FIND function in Excel is used to return the position of a specific character or substring within a text string. The first 2 arguments are required, the last one is optional. Find_text - the character or substring you want to find. Within_text - the text string to be searched within.
This formula needs to be array-entered, so press Ctrl + Shift + Enter. There are wildcard characters before and after the cell references to D1:D3, so the text will be found anywhere within the text string.
Try amending your formula to search for Char(34), think this will help with readability instead of having 10,000 quotes in your formula.
=IF(COUNT(FIND(CHAR(34),A1))
You use a bunch of "
until Excel understands it has to look for one :)
=FIND("""", A1)
Explanation:
Between the outermost quotes, you have ""
. The first quote is used to escape the second quote so that ""
in between quotes means a single double quote.
Also, you can drop the 1 at the end if you want to check the whole string.
Note that it's find character, into cell. Or use CHAR(34)
which is the equivalent of a quote:
=FIND(CHAR(34), A1)
You could use search too
=SEARCH("""";A1)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With