How to quote a quote with the CONCATENATE function in OOCalc

Richard H picture Richard H · Jan 27, 2010 · Viewed 95.9k times · Source

In OOCalc I want to use the CONCATENATE function to add quotes to each string in column A.

So in cell B1 I want to do:

=CONCATENATE("\"",A1,"\"")

OOCalc does not like this, or without the escaping backslash.

Does anyone know how to do this, or what an alternative method might be?

Answer

Andy Balaam picture Andy Balaam · May 20, 2010

This works for me:

=CONCATENATE("""",A1,"""")

Repeating the quotes escapes them (as it does in Visual Basic, I believe), so """" reads as: 'one quote to start a string, one escaped quote (""), then one quote to finish the string'.