Meet the Other Phone. Child-safe in minutes.

Meet the Other Phone.
Child-safe in minutes.

Buy now

Please or to access all these features

Chat

Join the discussion and chat with other Mumsnetters about everyday life, relationships and parenting.

Excel help please - Conditional formatting, red, amber dates

45 replies

IsItPossibleToDoThis · 23/06/2023 12:32

Hi,

Can someone help me please 🙏

I have a spreadsheet and it has column i: X date
I have column J: X due

I already have a formula (=i4+42) in column J and a cell at the top that has =today() in it to add the due date in.

I want column J to turn amber if the due date is in 7 days, stay amber, until the day after, when it turns red as it is overdue.

I can get J to turn r if overdue but I can't make it do the amber bit and all the instructions I'm getting aren't working.

Thank you!

OP posts:
Thread gallery
8
IsItPossibleToDoThis · 23/06/2023 13:47

Some cells are amber but they are not due within 7 days, they are due in August 😫

OP posts:
Mxflamingnoravera · 23/06/2023 13:48

If column J has a formula instead of a direct value, you can modify the conditional formatting formulas to consider the formula result instead. Here's how you can adjust the conditional formatting formulas for column J:
For turning cells amber if the due date is within 7 days from the current date:

  1. Select the range of cells in column J where you want the conditional formatting to apply.
  2. Go to the "Home" tab in the Excel ribbon.
  3. Click on the "Conditional Formatting" button in the "Styles" group, and then select "New Rule" from the dropdown menu.
  4. In the "New Formatting Rule" dialog box, select the option "Use a formula to determine which cells to format."
  5. In the "Format values where this formula is true" field, enter the following formula:
  1. =AND(I1-TODAY()>=0, I1-TODAY()<=7, J1="")
  2. This formula checks if the difference between the date in column I and the current date (TODAY) is between 0 and 7 days and if the cell in column J is empty.
  3. Click on the "Format" button to choose the formatting style for cells that meet the condition. In this case, select the "Fill" tab and choose an amber color.
  4. Click "OK" to close the "Format Cells" dialog box.
  5. Back in the "New Formatting Rule" dialog box, click "OK" to apply the conditional formatting rule.
Now, the cells in column J will turn amber if the due date is within 7 days from the current date and the cell in column J is empty. For turning cells red if the due date has passed:
  1. Select the range of cells in column J again.
  2. Click on the "Conditional Formatting" button in the "Styles" group, and select "New Rule" from the dropdown menu.
  3. In the "New Formatting Rule" dialog box, select the option "Use a formula to determine which cells to format."
  4. In the "Format values where this formula is true" field, enter the following formula:

12.=AND(I1-TODAY()<0, J1="")

  1. This formula checks if the difference between the date in column I and the current date (TODAY) is negative, indicating that the due date has passed, and if the cell in column J is empty.
  2. Click on the "Format" button to choose the formatting style for cells that meet the condition. In this case, select the "Fill" tab and choose a red color.
  3. Click "OK" to close the "Format Cells" dialog box.
  4. Click "OK" in the "New Formatting Rule" dialog box to apply the conditional formatting rule.
Now, the cells in column J will turn amber if the due date is within 7 days from the current date and the cell in column J is empty. They will turn red if the due date has passed and the cell in column J is empty.
Richvanilla · 23/06/2023 13:49

You need

< TODAY()

For the red overdue and

=AND(J2>TODAY(), J2<=TODAY() +7))

for the amber

IsItPossibleToDoThis · 23/06/2023 13:52

Mxflamingnoravera · 23/06/2023 13:48

If column J has a formula instead of a direct value, you can modify the conditional formatting formulas to consider the formula result instead. Here's how you can adjust the conditional formatting formulas for column J:
For turning cells amber if the due date is within 7 days from the current date:

  1. Select the range of cells in column J where you want the conditional formatting to apply.
  2. Go to the "Home" tab in the Excel ribbon.
  3. Click on the "Conditional Formatting" button in the "Styles" group, and then select "New Rule" from the dropdown menu.
  4. In the "New Formatting Rule" dialog box, select the option "Use a formula to determine which cells to format."
  5. In the "Format values where this formula is true" field, enter the following formula:
  1. =AND(I1-TODAY()>=0, I1-TODAY()<=7, J1="")
  2. This formula checks if the difference between the date in column I and the current date (TODAY) is between 0 and 7 days and if the cell in column J is empty.
  3. Click on the "Format" button to choose the formatting style for cells that meet the condition. In this case, select the "Fill" tab and choose an amber color.
  4. Click "OK" to close the "Format Cells" dialog box.
  5. Back in the "New Formatting Rule" dialog box, click "OK" to apply the conditional formatting rule.
Now, the cells in column J will turn amber if the due date is within 7 days from the current date and the cell in column J is empty. For turning cells red if the due date has passed:
  1. Select the range of cells in column J again.
  2. Click on the "Conditional Formatting" button in the "Styles" group, and select "New Rule" from the dropdown menu.
  3. In the "New Formatting Rule" dialog box, select the option "Use a formula to determine which cells to format."
  4. In the "Format values where this formula is true" field, enter the following formula:

12.=AND(I1-TODAY()<0, J1="")

  1. This formula checks if the difference between the date in column I and the current date (TODAY) is negative, indicating that the due date has passed, and if the cell in column J is empty.
  2. Click on the "Format" button to choose the formatting style for cells that meet the condition. In this case, select the "Fill" tab and choose a red color.
  3. Click "OK" to close the "Format Cells" dialog box.
  4. Click "OK" in the "New Formatting Rule" dialog box to apply the conditional formatting rule.
Now, the cells in column J will turn amber if the due date is within 7 days from the current date and the cell in column J is empty. They will turn red if the due date has passed and the cell in column J is empty.

Thanks, that hasn't worked.

OP posts:
IsItPossibleToDoThis · 23/06/2023 13:55

Richvanilla · 23/06/2023 13:49

You need

< TODAY()

For the red overdue and

=AND(J2>TODAY(), J2<=TODAY() +7))

for the amber

Thank you.

That highlights one cell on the whole sheet amber, where col I is emptey and col J just has 11/02/00.

OP posts:
IsItPossibleToDoThis · 23/06/2023 14:02

Is it easier to do in excel sheets? I think we are going to move the sheet from excel to sheets as its easier to have multiple people work on it.

OP posts:
CovertImage · 23/06/2023 14:12

How about these? - mine are for future dates but you could amend the formulae to suit you. The formats are applies to a single column

Excel help please - Conditional formatting, red, amber dates
Excel help please - Conditional formatting, red, amber dates
Excel help please - Conditional formatting, red, amber dates
CovertImage · 23/06/2023 14:13

Sorry it looks a mess. You can see the individual pics when you click on them!

Richvanilla · 23/06/2023 14:23

Are you deleting all the rules that aren't working? Those formulas were copied directly from a sheet I have which does the same thing and works

IsItPossibleToDoThis · 23/06/2023 14:26

I've done it on google sheets using this page
https://sheetaki.com/highlight-expiration-due-dates-google-sheets/

and this conditional formatting

I'm just going to try these in excel now.

Excel help please - Conditional formatting, red, amber dates
OP posts:
IsItPossibleToDoThis · 23/06/2023 14:27

Richvanilla · 23/06/2023 14:23

Are you deleting all the rules that aren't working? Those formulas were copied directly from a sheet I have which does the same thing and works

Yes

OP posts:
Coronationstation · 23/06/2023 15:09

Go into "conditional formatting" and clear all rules.
Then create new rule.
Under "select a rule type" choose "Format only cells that contain". In the equation builder below change the between to "less than or equal to" and input the cell reference where your today()+7 value is. Set the format of this one to amber.
Then create another new rule, same thing again but input the cell reference where today() is and set the format of this one to red.
Make sure it has locked the cell for the today() and today()+7 values, otherwise it will move down a row as it goes down the table and might explain why you're getting odd results. So if today() value is in cell K2 for example, it should read $K$2 in your conditional formatting equation.

IsItPossibleToDoThis · 23/06/2023 16:06

I haven't got a today()+7 formula anywhere

OP posts:
Coronationstation · 23/06/2023 16:18

Then make one next to today()

IsItPossibleToDoThis · 23/06/2023 16:44

That will make my 'todays date' 7 days in the future though.

OP posts:
FatAgainItsLettuceTime · 23/06/2023 16:47

IsItPossibleToDoThis · 23/06/2023 16:44

That will make my 'todays date' 7 days in the future though.

Take a look at the attachment I posted earlier in the thread.

You do want a field that says today + 7 days because that's your amber window.

Then with the conditional formatting

Red is everything greater than todays date

Amber is everything between today and today + 7

Green is everything that's greater than today + 7

IsItPossibleToDoThis · 23/06/2023 16:56

ahhh so i need to base dates, of sorts.

Thats worked! Thank you!

Except its putting things 7 days afetr today in amber, I want the 7 days before the due date to be amber. I changed it from +7 to -7 and it makes those cells red.

OP posts:
IsItPossibleToDoThis · 23/06/2023 17:01

I've had enough of this for today. I'll sort it out on Monday and push to get us switched to google sheets.

OP posts:
IsItPossibleToDoThis · 23/06/2023 17:01

Thank you everyone for your help.

OP posts:
FatAgainItsLettuceTime · 23/06/2023 17:03

IsItPossibleToDoThis · 23/06/2023 16:56

ahhh so i need to base dates, of sorts.

Thats worked! Thank you!

Except its putting things 7 days afetr today in amber, I want the 7 days before the due date to be amber. I changed it from +7 to -7 and it makes those cells red.

Sorry typing in my car while I wait for DD so don't have excel in front of me so made a mistake

Red is everything greater smaller than todays date

Amber is everything between today and today + 7

Green is everything that's greater than today + 7

New posts on this thread. Refresh page