Forum Discussion

Diana Delaney-Francis's avatar
Diana Delaney-Francis
Copper Contributor
Nov 13, 2018

macro script conditional formatting

I'm trying to create a macro that will shade entire rows a color based on a cell value. I tried using conditional formatting but it seems to only work on my 1st rule. How do I do this for multiple rules?

10 Replies

  • Hi Diana,

     

    Could you please give bit more details what exactly doesn't work. In general good practice is one color-one rule for entire range, the rest is how do you apply the formula.

    • Diana Delaney-Francis's avatar
      Diana Delaney-Francis
      Copper Contributor

      I tried recording a macro with multiple conditional formatting. The end result should be that 1st for any date in column O occurring today the entire row should be shaded red, 2nd for any date in column occurring tomorrow the entire row should be shaded orange, and 3rd any date in column occurring this week then the entire row should be shaded light blue. Everything else remains unshaded. When I look at the macro script the the 2nd and 3rd options don't record and when I try to run the macro the red shading doesn't shade the correct rows.

  • Dean_Gross's avatar
    Dean_Gross
    Silver Contributor
    I would recommend asking this question in the Excel community where it will be seen by people with that expertise.

Resources