Gerard Cruz
Gerard Cruz

Reputation: 649

Add quotes at the start and end of each line in a multiline cell

Let's say I have a cell that contains:

alpha
beta
charlie
delta

Is there a way by formula or search/replace (probably using regex like find (.+) and replace with "$&") to make it like this?:

"alpha"
"beta"
"charlie"
"delta"

Upvotes: 1

Views: 216

Answers (1)

tohuwawohu
tohuwawohu

Reputation: 13618

For your example data (if the values per line don't contain whitespace), the following will work (tested with LibreOffice Calc 4.2):

  • Search for ([:alnum:]+),
  • replace with "$1" (with Regular Expressions enabled):

enter image description here

Upvotes: 1

Related Questions