Conditional format between number of months

dpbarry

Board Regular
Joined
Feb 10, 2003
Messages
214
Office Version
  1. 2016
Platform
  1. Windows
Hi Folks

I'm working on a spreadsheet for our local lifeboat station to give visual reference to a rolling group of exercise dates for revalidation over an 18 month period for sea going lifeboat crew

Basically, there are 15 exercises that crew have to complete within an 18 month timeframe and what I wish to do is run conditional formats from the date inserted in the box that conditionally formats it green if 12 months old or less, Amber if greater than 12 months but less than 18 months and Red if greater than 18 months (gives crew and management time to target specific exercise or enquire as to why crew member has not been able to complete designated exercise with specific timeframe.

At moment I have the setup as follows. (Don't worry about the 18 in the ALB Anchoring and Veering section. This was just to help me visualise the number of months for the conditional formatting)

As you can see, I can get it to work for less than or equal to 12 months (Green) and greater than or equal to 18 months (Red - which is a big No-No for Crew) but for the life of me, I can't see to work out how to construct the conditional format to be be greater than or equal to 13 AND less than or equal to 18 (Warning - Amber).

At moment it is showing Red as the date is greater and equal to 18 months and it works if I set a date in cell F3 where the number of months is less than or equal to 12 (Turns Green)

Any assistance greatly appreciated

Declan


New OCF Exercise Training and Service Log 2021.xlsx
DEFGHIJKLMN
1Station NotesALB Plan Start DateALB Lifeboat
2ALB PPE, SAR Unit Layout and PyrosALB TowingALB Mooring and BerthingALB Helming and SAR Unit HandlingALB Anchoring and VeeringALB Emergency ProceduresALB Search and RescueALB NavigationALB Helicopter Operations
301/04/2018.00
OCF ALB Exercises
Cell Formulas
RangeFormula
J3J3=DATEDIF(F3, TODAY(), "M")
Cells with Conditional Formatting
CellConditionCell FormatStop If True
F3Expression=DATEDIF(F3, TODAY(), "M")>=18textNO
F3Expression=DATEDIF(F3, TODAY(), "M")<=12textNO
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Hi DPBarry,

Here is my solution (and I also responded to your other thread)

DPBarry.xlsx
DEFGHIJKLMN
1Station NotesALB Plan Start DateALB Lifeboat
2ALB PPE, SAR Unit Layout and PyrosALB TowingALB Mooring and BerthingALB Helming and SAR Unit HandlingALB Anchoring and VeeringALB Emergency ProceduresALB Search and RescueALB NavigationALB Helicopter Operations
301-Apr-2018
411-Apr-20
501-May-20
609-Sep-20
701-Jan-21
Sheet2
Cell Formulas
RangeFormula
J3J3=DATEDIF(F3, TODAY(), "M")
Cells with Conditional Formatting
CellConditionCell FormatStop If True
F3:F7Expression=EDATE(F3,18)<TODAY()textNO
F3:F7Expression=AND(EDATE(F3,12)<TODAY(),EDATE(F3,18)>=TODAY())textNO
F3:F7Expression=AND(EDATE(F3,0)<TODAY(),EDATE(F3,12)>=TODAY())textNO
 
Upvote 0
Solution
Hi DPBarry,

Here is my solution (and I also responded to your other thread)

DPBarry.xlsx
DEFGHIJKLMN
1Station NotesALB Plan Start DateALB Lifeboat
2ALB PPE, SAR Unit Layout and PyrosALB TowingALB Mooring and BerthingALB Helming and SAR Unit HandlingALB Anchoring and VeeringALB Emergency ProceduresALB Search and RescueALB NavigationALB Helicopter Operations
301-Apr-2018
411-Apr-20
501-May-20
609-Sep-20
701-Jan-21
Sheet2
Cell Formulas
RangeFormula
J3J3=DATEDIF(F3, TODAY(), "M")
Cells with Conditional Formatting
CellConditionCell FormatStop If True
F3:F7Expression=EDATE(F3,18)<TODAY()textNO
F3:F7Expression=AND(EDATE(F3,12)<TODAY(),EDATE(F3,18)>=TODAY())textNO
F3:F7Expression=AND(EDATE(F3,0)<TODAY(),EDATE(F3,12)>=TODAY())textNO
Cheers Toadstool

Works perfect. On wee bit did cause me a bit of a headscratcher - then I smacked it when I reaised it was my stupitity.

Many thanks for your assistance

Declan
 
Upvote 0
Cheers Toadstool

Works perfect. On wee bit did cause me a bit of a headscratcher - then I smacked it when I reaised it was my stupitity.

Many thanks for your assistance

Declan
You're welcome.
 
Upvote 0

Forum statistics

Threads
1,214,823
Messages
6,121,777
Members
449,049
Latest member
greyangel23

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top