开发者

Special character replacing

Is it possible开发者_C百科 to remove the " character using an Excel formula?

I tried the REPLACE function like this

REPLACE(<sometext>, """, "")

and this

REPLACE((<sometext>, char(34), "")

but it doesn't work.

NB: I am using the Polish version of Excel, so it is probable, that the syntax is different than in the English version. For example, in Polish formulas we use ; instead of , as argument separator.


The quotation mark character " must be represented by two of them "" when it's inside a string, to revolve the ambiguity between this "textual" quotation mark and the "code" quotation marks that delimit the beginning and end of your string.

In short, the right formula to remove all " from the text in A1 is:

=SUBSTITUTE(A1,"""","")

with emphasis on the fact that the old_text argument has to be """" (four quotes) and not """ (three quotes) as you wrote in your question.

And maybe SUBSTITUTE is called Replace in the Polish edition? Anyhow, you have to use the Polish equivalent of SUBSTITUTE and whatever argument separator is appropriate (; or ,).


Replace doesn't work the way, you want it to.
Use SUBSTITUTE.

=SUBSTITUTE(A1, CHAR(34), "-")

OR use ; as separator for your example

=SUBSTITUTE(A1; CHAR(34); "-")
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜