Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to search for " in string - EXCEL

Tags:

excel

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!

like image 746
TheRealPapa Avatar asked Sep 17 '13 10:09

TheRealPapa


People also ask

How do I find a character in a text string?

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.

How do I search for text in an array in Excel?

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.


3 Answers

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))
like image 72
Alec. Avatar answered Oct 12 '22 14:10

Alec.


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)
like image 32
Jerry Avatar answered Oct 12 '22 16:10

Jerry


You could use search too

=SEARCH("""";A1)

enter image description here

like image 34
MrSimpleMind Avatar answered Oct 12 '22 14:10

MrSimpleMind