Conditional format current month and the next 2 months

mickyd67

Board Regular
Joined
Jul 13, 2011
Messages
80
Office Version
  1. 365
Platform
  1. Windows
Hi All,

Any kind soul help me with this one?

I know you can conditionally format dates in the future etc, but it only goes out to the following month.

If I wanted to highlight June, July & August, as of today, is there a formula / condition I can use to do that?
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
I assume that your values are valid dates, right?
Do you want it to just go out 2 months from today (August 10), or do you want to go all the way out to the end of August?
 
Upvote 0
if you want to included all dates for the next 3 months, you could use this conditional formatting rule:
Assume the date in question is in cell A2.
The rule for A2 would be:
Excel Formula:
=if(and(A2>=Today(),A2<=edate(Today(),3))

Book1
ABCDEFGHIJKLMNO
1
22024-05-252024-06-042024-06-092024-06-102024-06-202024-06-302024-07-102024-07-202024-07-302024-09-092024-09-102024-09-112024-09-21
3FALSEFALSEFALSETRUETRUETRUETRUETRUETRUETRUETRUEFALSEFALSE
Sheet16
Cell Formulas
RangeFormula
D2,O2,G2:K2D2=C2+10
C3:O3C3=AND(C2>=TODAY(),C2<=EDATE(TODAY(),3))
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C2:O2Expression=AND(C2>=TODAY(),C2<=EDATE(TODAY(),3))textNO
 
Upvote 0
I assume that your values are valid dates, right?
Do you want it to just go out 2 months from today (August 10), or do you want to go all the way out to the end of August?

Hi there - yeah they are. Basically 1st June, 1st July etc etc.

I am looking to highlight current month +2, so that would highlight June, July & August. To answer your question: Yes, would go out to the end of the 2nd month regardless of the date in the current month.
 
Upvote 0
if you want to included all dates for the next 3 months, you could use this conditional formatting rule:
Assume the date in question is in cell A2.
The rule for A2 would be:
Excel Formula:
=if(and(A2>=Today(),A2<=edate(Today(),3))

Book1
ABCDEFGHIJKLMNO
1
22024-05-252024-06-042024-06-092024-06-102024-06-202024-06-302024-07-102024-07-202024-07-302024-09-092024-09-102024-09-112024-09-21
3FALSEFALSEFALSETRUETRUETRUETRUETRUETRUETRUETRUEFALSEFALSE
Sheet16
Cell Formulas
RangeFormula
D2,O2,G2:K2D2=C2+10
C3:O3C3=AND(C2>=TODAY(),C2<=EDATE(TODAY(),3))
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C2:O2Expression=AND(C2>=TODAY(),C2<=EDATE(TODAY(),3))textNO

Thanks - I'll give that a try.
 
Upvote 0
Hi there - yeah they are. Basically 1st June, 1st July etc etc.

I am looking to highlight current month +2, so that would highlight June, July & August. To answer your question: Yes, would go out to the end of the 2nd month regardless of the date in the current month.
If you want that, try this formula:
Excel Formula:
=AND(A2>TODAY(),A2<=EOMONTH(EDATE(A2,2),0))
 
Upvote 0
Excel Formula:
      =AND(A2>=TODAY(),A2<=EOMONTH(TODAY(),3))
 
Last edited:
Upvote 0
Whoops, my formula should be:
Excel Formula:
=AND(A2>TODAY(),A2<=EOMONTH(EDATE(TODAY(),2),0))
or borrowing from awoohaw's logic:
Excel Formula:
=AND(A2>TODAY(),A2<=EOMONTH(TODAY(),2))

Excel Formula:
      =AND(A2>=TODAY(),A2<=EOMONTH(TODAY(),3))
awoohaw,
Note that formula goes to the end of September, not August!
That "3" needs to be a "2", like in my formula.
 
Upvote 0
Solution
Whoops, my formula should be:
Excel Formula:
=AND(A2>TODAY(),A2<=EOMONTH(EDATE(TODAY(),2),0))
or borrowing from awoohaw's logic:
Excel Formula:
=AND(A2>TODAY(),A2<=EOMONTH(TODAY(),2))


awoohaw,
Note that formula goes to the end of September, not August!
That "3" needs to be a "2", like in my formula.
Meh. July doesn't exist! Even though I was born in it. ;)
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,196
Members
452,616
Latest member
intern444

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