4

How can I highlight cells in Google Sheets if current month?

The cells have Jan-2017, Feb-2017 etc. and not dates.

I just want the current month highlighted so that the rest of the team can keep track of our monthly stats.

2 Answers 2

8

I'm supposing the column that has the months is A, and that the actual values of each cell is the first day of each month (so 2/1/2017 for February for example).

Select where you want the conditional formating to go, and open the conditional formatting sidebar.

Choose "Custom Formula" from the dropdown, and paste the following in:

=$A:$A=(today()-day(today())+1)

What we are doing here is:

  • =A$:A$ - Look in column A for the following

  • today() get todays date

  • -day(today()) get the day and subtract it from the today in the previous point

  • +1 add 1 to the result because 2/8/2017 - 8 = 2/0/2017, which google sheets actually recognizes as 1/31/2017, so by adding 1 it will become 2/1/2017 which is what is wanted.

  • The result of this sum is then compared to the data found in A$:A$ and the results which match the sum (today()-day(today())+1) are highlighted.

3
  • Much appreciated CalvT!
    – Nikos
    Commented Feb 8, 2017 at 17:42
  • @Nikos accept the answer then please - the little tick underneath the arrows on my answer :)
    – CalvT
    Commented Feb 8, 2017 at 17:42
  • Yes! Cheers for this.
    – Nikos
    Commented Feb 13, 2017 at 12:56
5

Just for the record, this may work as well using conditional formatting's custom formula:

=month($A:$A)=month(today())

Considering the dates are in the column A

Not the answer you're looking for? Browse other questions tagged or ask your own question.