smilingfrog
smilingfrog

Reputation: 436

How can you format a date with a carriage return in libreoffice?

I have a spreadsheet that is used to summarize monthly data. The cell contains a date. I want to format certain dates to include text as follows:

February Direct Hours   |  March Direct Hours

to look like

February                |  March 
Direct Hours            |  Direct Hours 

How can this be done? Thanks in advance.

Upvotes: 1

Views: 1741

Answers (3)

acronym
acronym

Reputation: 71

CHAR(13) is a carriage return, so using CHAR(10) followed by CHAR(13) do the trick.

Upvotes: 0

hewettp
hewettp

Reputation: 11

Another option is to use a formula like;

=TEXT(a4,"MMMM") & CHAR(10) & "Direct Hours"

where A4 is the cell with the date value for the month you wish to display.

Upvotes: 1

Epameinondas
Epameinondas

Reputation: 848

From: https://forum.openoffice.org/en/forum/viewtopic.php?f=9&t=54503

The only way to enter a line break is when you edit the text in the cell: double-click on the cell itself and you can enter a line break by typing Ctrl+Enter. It doesn't work when you're typing in the formula toolbar.

Moreover, this is possible by a formula, by using CHAR(10) as the enter character:

CONCATENATE("First line";CHAR(10);"Second line")

Hope, this helps.

Upvotes: 4

Related Questions