I am trying to change the color of a cell if one cell is under this date, and within the range of another. Example

Medical
Cell AK :1 Jan 09 (when he completed)
Cell DP: age of person

Now, say the person completed their medical on 1 Jan 09 and is under 40, the medical is good for 5 years, and the cells date should be green

If the mbr is over 40, they have to complete a medical every 2 yrs, and the date of 1 Jan 09 would be red.

If the person is within 6 months of their medical date expiring based on the information above, the cell should be yellow.

Any help, I am racking my brain right now.