Search code examples
excelexcel-formulaexcel-2011vba

column shading by date range


I have a spreadsheet that has various rows filled in colours while the columns are set to months in text form - 'mmm'

what I want to do is format the sheet so the column that is the current month is shaded - for example - March - to show it is the current month. This will change as we move into April etc etc

I only want Current Month column to be shaded but I need to keep my original 'filled rows' as shown in the below screen example as they highlight other important info.

example sheet:-enter image description here

Can anyone point me in the correct direction?

All advice very welcomed.

I am using Excel 2011 for Mac.

my hoped for result is something along the lines of the below:

enter image description here


Solution

  • Here's another Conditional Formatting formula that works with your setup. Add this formatting rule from A2 to L22 in your case:

    =LOWER(A$1)= LOWER(TEXT(NOW(),"MMM"))
    

    Note that the conditional formatting with override your row colors.