How can I add quotation marks to a libreoffice calc cell text?

Viewed 8025

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

1 Answers

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:

  1. Select the column containing the data to modify
  2. select Menu "Edit" -> "Find & Replace..."
  3. Enter ^(.*)$ as search text (matches the whole cell content) and "$1" as replace text (returns the complete search match, embedded in quotes): enter image description here
  4. Hit Replace or Replace all to execute the search/replace run.
Related