Inserting a paragraph mark in a Calc function

Can you insert a paragraph mark on a calc function to produce a correct name and address.

This is what I want

Kathleen X, Director, Government Affairs Central Maine Power Co One City Center, 5th Floor Portland ME 04101 Portland, ME 04101

To convert to this:

Kathleen X, Director, Government Affairs
Central Maine Power Co
One City Center, 5th Floor
Portland ME 04101

=F2 & ___ & G2 & ___ & h2 & ___ & L2

What do I put int the ___ spaces?

And don’t tell me to use the Mail Merge Wizard. It sucks!

Steven Scharf

CHAR(10)

https://wiki.documentfoundation.org/Documentation/Calc_Functions/CHAR

PS: Concerning Mail-Merge I’d recommend to use it without the wizard.

1 Like

Unsolicited advice:
Avoid such compounds.
For further processing they area a mess.
For printing it’s much better to use a separate cell per element of the address or per line. Only this way you can also set line heighths, character styles (a bold part e.g.) and the like as wanted/needed.

You don’t need to use the Wizard; I have never used it.
First register the spreadsheet as the database.

  1. Click File > New > Database
  2. Select Connect to an existing database and choose Spreadsheet. Click Next
  3. Browse to your spreadsheet, click Next
  4. Select Yes, register the database for me and click Finish and name it

Add the fields to the Writer document

  1. Open or create the Writer document in which you want the fields.
  2. Click Insert > Field > More fields Ctrl+F2
  3. In the dialogue that opens, select the Database tab
  4. In it select Mail merge fields, the database that you just registered, select the sheet, select the first field, say first_name, click Insert. Add a space after the inserted field and select last_name, click in the sheet and press Enter. Carry on adding fields where you want them.

I want to thank Wander for answering my question without judgment or telling me about things I did not ask about showing me the simplest method possible.

In this instance, I need to be able to put the name and address info in a block for a specific purpose.

Thanks for all of your help.

Hallo

=TEXTJOIN(UNICHAR(10);1; $F$2:$H$2; $L$2)
1 Like