Cell formatting based on the current month

Solved
gilbereto Posted messages 113 Registration date   Status Member Last intervention   -  
gilbereto Posted messages 113 Registration date   Status Member Last intervention   -
Hello,
I would like to apply formatting based on the current year and month.
For example, in column A, I have all my dates month by month.
A1 = 01/01/2017
A2 = 01/02/2017
etc.
In column D,
D1 contains a calculated value corresponding to the date in A1,
D2 contains a calculated value corresponding to the date in A2,
etc.
I want the formatting to be automatic based on the current month, and for it to change automatically when moving to the next month.

I hope I have been clear enough in my explanations.

Thanks to everyone who takes some time to help me.

Gilberto

Configuration: Windows / Internet Explorer 11.0

1 answer

  1. Mike-31 Posted messages 18405 Registration date   Status Contributor Last intervention   5 147
     
    Hello,

    Start by selecting your range example A1:A365
    Conditional formatting
    The formula is
    =MONTH(A1)=MONTH(TODAY())
    Format and choose the fill color

    If you want to color the cells in columns A and D, select the range A1:D365
    the formula will be
    =MONTH($A1)=MONTH(TODAY())
    format choose the color

    If you also want to take the year into account
    =AND(YEAR($A1)=YEAR(TODAY()),MONTH($A1)=MONTH(TODAY()))

    See you later
    Mike-31

    Not knowing is not a failure, failure is the refusal to learn.
    0
    1. gilbereto Posted messages 113 Registration date   Status Member Last intervention  
       
      Hello Mike,
      Great, it works very well
      Thank you very much!!!
      0