Escaping literals in formulas

How can I escape a formula value to output text values that include quotes. I want an if formula to ouput the following text exactly as is -- \"http://myref.com\" -- In order to get the equation to take in Numbers, I have to input it as "\"'http://myref.com\""" and then it comes out with both quotation marks which won't work for me. So how do I get it to take the formula and output the text value \"http://myref.com\"


The formula would look like if(A1=0, "Use this", "\"http://myref.com\""). Also tried it with single quotes as in if(A1=0, 'Use this', '\"http://myref.com\"')

Mac Pro, Mac OS X (10.7.2)

Posted on Jan 2, 2012 4:39 PM

Reply
4 replies

Jan 2, 2012 4:55 PM in response to bostboy

BB,


Format two column as Text and enter your literal strings there, true case and false case, then reference the strings from elsewhere.


For example, if your text strings are in B, you can use the equation: =IF(A=0, "Use This", B)


Your string -- \"http://myref.com\" -- will retain all it's punctuation if inserted in a column formatted as Text. (I can't figure out how to prevent that URL-like string from acting like a link in the forum software)



Regards,


Jerry

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Escaping literals in formulas

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.