I had a similar problem.
I wanted Excel to select the part of a sentence that was -- I thought -- between quotation marks " "
(or CHAR(34)
in excel) while in fact it was between a
Left double quotation mark (or CHAR(147)
in excel) “
and a
Right double quotation mark (or CHAR(148)
in excel) ”
In cell A1 I had a text string that went pretty much as follows:
blablablabla “None of the sectors reported in 2000 blablabla”
I wanted Excel to select the only part I was interested in which was :
--> None of the sectors reported in 2000 <--
You can use this formula:
=TEXTBEFORE(TEXTAFTER(A1,"“"),CHAR(148),)
For the sake of a more comprehensive example here I used "“" in the formula TEXTAFTER(A1,"“")
but I could have used TEXTAFTER(A1,CHAR(147)
Similarly with the TEXTBEFORE formula where I used CHAR(148), but I could have used "”" instead.
Anyway just make sure you don't get confused with “ ” (right and left double quotation marks) and " " (quotation mark).