Ask Your Question
1

Conditional Formatting Based On Date

asked 2012-08-17 02:00:37 +0200

Tech.CG gravatar image Tech.CG
37 2 3 5

I would like to set some cells that contain a date to change their font, color, font styles, etc... when the date +6 months has been reached.

Example:

If I set the date in the cell to 8/16/12, then in 6 months from now, I want the date to change to look like 8/16/12 or similar.

Any advice?

Thanks in advance.

delete close flag offensive retag edit

2 Answers

Sort by » oldest newest most voted
1

answered 2012-08-17 15:25:56 +0200

w_whalley gravatar image w_whalley flag of United States
1581 10 24

You can do this with conditional formatting.

In the target cell choose Format/Conditional Formatting. Set the condition as "Formula is" and make the formula TODAY()>41322 where the number 41322 is the date 6 months from now expressed as a number. Create a new style as the cell style with the properties you want (e.g. bold, italics). When the formula evaluates true (6 months from now) the new format will be displayed.

You can get the number corresponding to the future date by typing the date in a cell then changing the format of the cell to Number.

link delete flag offensive edit

Comments

I actually just used two cells. One that used =today() in A1 and another, B1 (with white lettering), that used =A1-180. After this I just used the conditional formatting to format the cell if the date was less than the value in B1.

Tech.CG ( 2012-08-18 00:25:57 +0200 )edit
0

answered 2012-08-17 20:58:45 +0200

mariosv gravatar image mariosv flag of Spain
4694 20 46

If you need an automatic formula: CellReference < EOMONTH(TODAY();-6)

link delete flag offensive edit

Comments

I actually just used two cells. One that used =today() in A1 and another, B1 (with white lettering), that used =A1-180. After this I just used the conditional formatting to format the cell if the date was less than the value in B1.

Tech.CG ( 2012-08-18 00:25:50 +0200 )edit

Login/Signup to Answer

Donate

LibreOffice is made available by volunteers around the globe, backed by a charitable Foundation. Please support our efforts: Your donation helps us to deliver a better product!

Question tools

Follow

subscribe to rss feed

Stats

Asked: 2012-08-17 02:00:37 +0200

Seen: 534 times

Last updated: Aug 17 '12