Reputation: 175
In libreoffice calc I have a column with thousand words. Each word I need to put into quotation marks.
Example (A1 and A2 are cells)
start word (A1): car
end word (A2): "car"
Normally, I can reference cells and add new text with quotes.
Example
= A1 & " wash" A2: car wash
But how do I get quotation marks as part of the text? Example
"car" wash
Upvotes: 6
Views: 13409
Reputation: 3240
It also works with CONCAT
and escaping the quote sign:
=CONCAT("""", A1, """ wash")
To escape "
, put another "
in front of it, so ""
results in one double quote "
. Putting this in a string results in """""
for one double quote.
Using double quotation marks in formulas
Upvotes: 0
Reputation: 13618
One way to add quotes: use the CHAR()
function together with the correct decimal ASCII code. CHAR(34) should return double quotes. You can insert the CHAR() function directly into a concat statement:
= CHAR(34) & A1 & CHAR(34) & " wash"
should combine the content of A1, nested into double quotes, and append " wash".
To modify the source data itself (in your example: no second column, modify the source column), you could use a search / replace with regular expressions. To do so:
^(.*)$
as search text (matches the whole cell content) and "$1"
as replace text (returns the complete search match, embedded in quotes):
Upvotes: 15