Change cell color after n days

Discuss the spreadsheet application
Post Reply
antony
Posts: 1
Joined: Fri Mar 01, 2019 3:01 pm

Change cell color after n days

Post by antony »

Hi, All I normally just use open office writer but I need to create a spreadsheet with a members list on but I need the cell that certain members names are in to turn red after 28 days and some to turn red after 84 days and some never to turn red but I have no idea where to start so any help would be hugely appreciated
Last edited by FJCC on Fri Mar 01, 2019 11:18 pm, edited 3 times in total.
Reason: Make a descriptive title.
OpenOffice 4.1.3
Windows 7 Ultimate
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Chanage cell color after n days

Post by Villeroy »

DateCategories.ods
(14.13 KiB) Downloaded 98 times
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
FJCC
Moderator
Posts: 9280
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Chanage cell color after n days

Post by FJCC »

You can do this with conditional formatting. First you need to enter the date that starts the countdown somewhere in the same row as the cell containing the member name. Let's say the name is in A3 and the date is in B3. After entering the date, select A3 and then go to the menu Format -> Conditional Formatting. Change the box that says Cell Value Is to Formula Is. Next to that, write the formula

Code: Select all

(TODAY() - B3) >= 28
Click the button that says New Style. Give the style a name on the Organizer tab and on the Background tab set the background to red. Click Ok until you are back to the main document.
You can copy this formatting to other cells that need to 28 day rule. Copy the cell as you normally would with CTRL + C or the menu Edit -> Copy. Select the cells you want to transfer the formatting to and then choose the menu Edit -> Paste Special. Choose to paste only the Formats.
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
Post Reply