How do I make an OpenOffice spreadsheet display a cell in bold if the date in the cell is in the past?
August 20, 2008 1:56 PM   Subscribe

How do I make an OpenOffice spreadsheet display a cell in bold if the date in the cell is in the past?

The cell currently contains a formula to display the date which is one week after the date in another cell:

=DATE(YEAR(B3);MONTH(B3);DAY(B3)+7)

How can I use the IF() and STYLE() functions to make the cell bold if that date is today or in the past? I've used the IF() before so I understand how it works but I can't figure out STYLE() or how to compare dates. Or if this is even possible.
posted by jesirose to Computers & Internet (2 answers total) 1 user marked this as a favorite
 
Best answer: Can you use conditional formatting instead? Choose Format | Styles and Formatting, then right-click to define a new style (call it PastDate). On the Font tab, check Bold, then click OK. Then select the cell you want to be bolded, and choose Format | Conditional Formatting. Under Condition 1, choose Cell value, is less than, and in the value box type TODAY(). Then choose PastDate under Cell Style. Et voila! dates that are before today are bolded, dates that are today or greater are not.
posted by harkin banks at 2:12 PM on August 20, 2008


Response by poster: Perfecto!
posted by jesirose at 2:26 PM on August 20, 2008


« Older Buying stocks quickly   |   is there a supply for my demand? Newer »
This thread is closed to new comments.