Conditional date formatting based on cells in a different column

I have several columns with different dates and date formats and a column with text. The final column should get a date and date format depending on the text in the text column. How do i have to set up the conditional formatting for the date format?

details
Column E contains a date with the format yyyy/mm
Column F contains either text “regular” or “one-time”
Column G contains a date with format yyyy/mm/dd (days are additional compare to column E)
Column I has to show the date and the date format of E or G depending on the content of the column F

eg.
E2 contains a date in format yyyy/mm
G2 contains a different date in format yyyy/mm/dd
If F2 contains text “regular”
Then i2 should display the date of E2 with the format of E2 (yyyy/mm)
If F2 contains text “one-time”,
Then I2 should display the date of G2 with the format of G2 (yyyy/mm/dd)

With an IF-statement I can pick up the correct date. However I cannot get the right format into the cells of column I.

How can I get the correct date format in the cells of column I depending on the content of the cells in column F2.

Thanks in advance for helpful replies!

You must create two Cell Style for the date. Then you need apply the actual Style by the Conditional Format feature . From the menu:
“Format - Conditional - Condition”

Use the the “Formula is” option (instead of the “Cell value” option).

3 Likes

an example @Zizi64

000_LO-CALC_logical decision of formattings of datums_111909.ods (19.1 KB)

2 Likes

ask123111.ods (13.2 KB)

1 Like