Share via

create a conditional formatting based on a date range identified in a specific column

Lora 20 Reputation points
2026-02-23T19:17:29.0933333+00:00

I am trying to create a conditional formatting command that identifies to date ranges based on a specific date.

Reference date found in B4 (02/05/2024)

Green formatting for dates between 150 to 240 days based on date entered in B4 (07/04/2024-10/02/2024)

Orange formatting for dates less 149 days and greater than 92 days, < 07/03/2024 or >05/07/2024 and dates between 241 and 256 days.

Anything beyond B4 + 256 days would be red.

Microsoft 365 and Office | Excel | For business | Windows
0 comments No comments
{count} votes

Answer accepted by question author
  1. Q&A Assist
    2026-02-23T19:17:38.13+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    To create conditional formatting based on the specified date ranges in Excel, you can use the following steps:

    1. Select the range where you want to apply the conditional formatting.
    2. Go to the Home tab, click on Conditional Formatting, and then select New Rule.
    3. Choose Use a formula to determine which cells to format.
    4. Enter the following formulas for each condition:
      • Green Formatting (for dates between 150 to 240 days):
        =AND(A1>=B4+150, A1<=B4+240)
        (Replace A1 with the first cell in your selected range.)
      • Orange Formatting (for dates less than 149 days and greater than 92 days):
        =OR(AND(A1<B4+149, A1>B4-92), AND(A1>=B4+241, A1<=B4+256))
      • Red Formatting (for dates beyond B4 + 256 days):
        =A1>B4+256
    5. After entering each formula, click on the Format button to choose the desired formatting (Green, Orange, or Red).
    6. Click OK to apply the rules.

    Make sure to adjust the cell references according to your specific worksheet layout. This method will allow you to visually differentiate the dates based on the conditions you specified.


    References:

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. EmilyS_726 14,940 Reputation points Volunteer Moderator
    2026-02-23T19:49:27.2966667+00:00

    Use formula based conditional formatting with your selected date range (for example, if your dates are in D:D, select that range first, then create rules using D1 as the first cell in the selection).

    Assuming:

    Reference date = $B$4

    Date to evaluate = the first cell in your selected range (example: D1)

    1. Green (150 to 240 days after B4)
    =AND(D1<>"", D1>=$B$4+150, D1<=$B$4+240)
    
    1. Orange (93 to 149 days OR 241 to 256 days after B4)
    =AND(D1<>"", OR(AND(D1>=$B$4+93, D1<=$B$4+149), AND(D1>=$B$4+241, D1<=$B$4+256)))
    
    1. Red (more than 256 days after B4)
    =AND(D1<>"", D1>$B$4+256)
    
    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.