# Conditional Formatting

#### Bazola

##### New Member
Hi All

I am hoping this will be a quick one!

I've got a spreadsheet with some columns in it, at the top it says the date such as Mar-19, next column says Apr-19 and so on. I want to use CF to highlight the current month and the associated cells below column wise. So for example,
Mar-19 is cell D4, the cells I also want to be highlighted as part of it are Cells D5-D8.

### Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Select rows 4-8
CF formula : =MONTH(A\$4)=MONTH(TODAY())

Last edited:
Select rows 4-8
CF formula : =MONTH(A\$4)=MONTH(TODAY())

Brilliant, thank you. I presume If I want to do the same for the other columns, do I need to do a seperate formula for each one or just change the "Applies to" to include the bigger selection?

Thanks

When I change the "Applies to" include all the other cells with the other months + figures below, it also highlights Mar-20 as well? Instead of Just Mar-19? Any ideas?

I presume If I want to do the same for the other columns, do I need to do a seperate formula for each one or just change the "Applies to" to include the bigger selection?
No. The "Applies to" (\$4:\$8 - i.e. rows 4:8) already covers all columns.
When I change the "Applies to" include all the other cells with the other months + figures below, it also highlights Mar-20 as well? Instead of Just Mar-19? Any ideas?
It is not clear what you want to do.

Sorry for not explaining properly. I have a number of column with say:

March 19
Apr 19
June 19
and so on

Underneath each column, I have figures. Basically I want CF to highlight the particular column all the cells. So if its March 19, I want that entire column to be red, and the rest stay white. But I want as little formulas as possible

Sorry for not explaining properly. I have a number of column with say:

March 19
Apr 19
June 19
and so on

Underneath each column, I have figures. Basically I want CF to highlight the particular column all the cells. So if its March 19, I want that entire column to be red, and the rest stay white. But I want as little formulas as possible

I have the same question. What I have done is copy the formula to the next column

Sorry for not explaining properly. I have a number of column with say:

March 19
Apr 19
June 19
and so on

Underneath each column, I have figures. Basically I want CF to highlight the particular column all the cells. So if its March 19, I want that entire column to be red, and the rest stay white. But I want as little formulas as possible

Ok, so I've modified the formula to point to Mar-19, and I've also modified the Applies to =\$C\$4:\$O\$8, this is all the columns above all the way up to March 20. However, now March 20 also gets highlighted in a different colour like March 19 at the same time. If I change the time on my pc to april, it highlights april and drops march which is good. But when it sees March 19 and March 20, it matches them both for some reason?

=month(c\$4)&year(c\$4)=month(today())&year(today())

Thanks so much, works a treat!

Replies
7
Views
96
Replies
2
Views
518
Replies
10
Views
530
Replies
1
Views
179
Replies
6
Views
199

1,214,775
Messages
6,121,498
Members
449,034
Latest member
Raygers

### 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.

### Which adblocker are you using?

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

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