I am trying to set up a conditional formatting query to highlight cells in my "actual" column, and I am getting some wierd results. I want cells where actual is equal to or greater than target, to be highlighted in green, and cells where actual is less than target to be highlighted in red.
I have used HTML maker to generate the following preview, but unfortunately the colour highlighting hasn't come out.
In my Excel 2010 worksheet, cell I7 is highlighted green; cells I8 to I17 inclusive are highlighted red (so far, so good), but puzzlingly, and incorrectly, cell I18 is highlighted in green, whereas it should be highlighted in red.
<b>Excel 2010</b><table cellpadding="2.5px" rules="all" style=";background-color: #FFFFFF;border: 1px solid;border-collapse: collapse; border-color: #BBB"><colgroup><col width="25px" style="background-color: #DAE7F5" /><col /><col /><col /></colgroup><thead><tr style=" background-color: #DAE7F5;text-align: center;color: #161120"><th></th><th>H</th><th>I</th><th>J</th></tr></thead><tbody><tr ><td style="color: #161120;text-align: center;">4</td><td style="text-align: right;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;;"></td><td style="text-align: center;border-top: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;;">Monthly</td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;;"></td></tr><tr ><td style="color: #161120;text-align: center;">5</td><td style="text-align: right;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;;"></td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;;">Actual</td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;;">Target</td></tr><tr ><td style="color: #161120;text-align: center;">6</td><td style="text-align: right;border-top: 1px solid black;border-right: 1px solid black;border-left: 1px solid black;;"></td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-left: 1px solid black;;"></td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-left: 1px solid black;;"></td></tr><tr ><td style="color: #161120;text-align: center;">7</td><td style="text-align: right;border-right: 1px solid black;border-left: 1px solid black;;">Mar-12</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">2</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">2</td></tr><tr ><td style="color: #161120;text-align: center;">8</td><td style="text-align: right;border-right: 1px solid black;border-left: 1px solid black;;">Apr-12</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">1</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">2</td></tr><tr ><td style="color: #161120;text-align: center;">9</td><td style="text-align: right;border-right: 1px solid black;border-left: 1px solid black;;">May-12</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">1</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">2</td></tr><tr ><td style="color: #161120;text-align: center;">10</td><td style="text-align: right;border-right: 1px solid black;border-left: 1px solid black;;">Jun-12</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">1</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">2</td></tr><tr ><td style="color: #161120;text-align: center;">11</td><td style="text-align: right;border-right: 1px solid black;border-left: 1px solid black;;">Jul-12</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">0</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">2</td></tr><tr ><td style="color: #161120;text-align: center;">12</td><td style="text-align: right;border-right: 1px solid black;border-left: 1px solid black;;">Aug-12</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">0</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">2</td></tr><tr ><td style="color: #161120;text-align: center;">13</td><td style="text-align: right;border-right: 1px solid black;border-left: 1px solid black;;">Sep-12</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">0</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">2</td></tr><tr ><td style="color: #161120;text-align: center;">14</td><td style="text-align: right;border-right: 1px solid black;border-left: 1px solid black;;">Oct-12</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">0</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">2</td></tr><tr ><td style="color: #161120;text-align: center;">15</td><td style="text-align: right;border-right: 1px solid black;border-left: 1px solid black;;">Nov-12</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">0</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">2</td></tr><tr ><td style="color: #161120;text-align: center;">16</td><td style="text-align: right;border-right: 1px solid black;border-left: 1px solid black;;">Dec-12</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">0</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">2</td></tr><tr ><td style="color: #161120;text-align: center;">17</td><td style="text-align: right;border-right: 1px solid black;border-left: 1px solid black;;">Jan-13</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">0</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">2</td></tr><tr ><td style="color: #161120;text-align: center;">18</td><td style="text-align: right;border-right: 1px solid black;border-left: 1px solid black;;">Feb-13</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">1</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">2</td></tr><tr ><td style="color: #161120;text-align: center;">19</td><td style="text-align: right;border-right: 1px solid black;border-left: 1px solid black;;"></td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;"></td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;"></td></tr><tr ><td style="color: #161120;text-align: center;">20</td><td style="text-align: right;border-right: 1px solid black;border-left: 1px solid black;;">Total</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">6</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">24</td></tr><tr ><td style="color: #161120;text-align: center;">21</td><td style="text-align: right;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;;"></td><td style="text-align: right;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;;"></td><td style="text-align: right;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;;"></td></tr></tbody></table><p style="width:3.6em;font-weight:bold;margin:0;padding:0.2em 0.6em 0.2em 0.5em;border: 1px solid #BBB;border-top:none;text-align: center;background-color: #DAE7F5;color: #161120">Visits</p><br /><br />
I generated the conditional format, by setting up a rule in cell I7, and then using format painter to apply it to cells I8 to I18 inclusive.
If I click on cell I18 and then on the conditional formatting button and then on "manage rules", I get the "Conditional formatting rules manager" dialogue box, which has 2 rules showing. (The identical dialogue box appears if clicked on any of the cells I8 to I18).
Rule one reads:-
Cell value >=J9 Green highlight Applies to =$I$8:$I$18
Rule two reads:-
Cell value "less than symbol"J9 Red highlight Applies to =$I$8:$I$18
(For some strange reason, if I put the actual less than symbol in the line above, half the text doesn't appear when I preview the post...?!)
Can anyone explain why cell I18 is highlighted green (it should be red, as 1 is less than 2).
Can anyone help me to get the conditional syntax right?
Thanks
Neil
I have used HTML maker to generate the following preview, but unfortunately the colour highlighting hasn't come out.
In my Excel 2010 worksheet, cell I7 is highlighted green; cells I8 to I17 inclusive are highlighted red (so far, so good), but puzzlingly, and incorrectly, cell I18 is highlighted in green, whereas it should be highlighted in red.
<b>Excel 2010</b><table cellpadding="2.5px" rules="all" style=";background-color: #FFFFFF;border: 1px solid;border-collapse: collapse; border-color: #BBB"><colgroup><col width="25px" style="background-color: #DAE7F5" /><col /><col /><col /></colgroup><thead><tr style=" background-color: #DAE7F5;text-align: center;color: #161120"><th></th><th>H</th><th>I</th><th>J</th></tr></thead><tbody><tr ><td style="color: #161120;text-align: center;">4</td><td style="text-align: right;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;;"></td><td style="text-align: center;border-top: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;;">Monthly</td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;;"></td></tr><tr ><td style="color: #161120;text-align: center;">5</td><td style="text-align: right;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;;"></td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;;">Actual</td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;;">Target</td></tr><tr ><td style="color: #161120;text-align: center;">6</td><td style="text-align: right;border-top: 1px solid black;border-right: 1px solid black;border-left: 1px solid black;;"></td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-left: 1px solid black;;"></td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-left: 1px solid black;;"></td></tr><tr ><td style="color: #161120;text-align: center;">7</td><td style="text-align: right;border-right: 1px solid black;border-left: 1px solid black;;">Mar-12</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">2</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">2</td></tr><tr ><td style="color: #161120;text-align: center;">8</td><td style="text-align: right;border-right: 1px solid black;border-left: 1px solid black;;">Apr-12</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">1</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">2</td></tr><tr ><td style="color: #161120;text-align: center;">9</td><td style="text-align: right;border-right: 1px solid black;border-left: 1px solid black;;">May-12</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">1</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">2</td></tr><tr ><td style="color: #161120;text-align: center;">10</td><td style="text-align: right;border-right: 1px solid black;border-left: 1px solid black;;">Jun-12</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">1</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">2</td></tr><tr ><td style="color: #161120;text-align: center;">11</td><td style="text-align: right;border-right: 1px solid black;border-left: 1px solid black;;">Jul-12</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">0</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">2</td></tr><tr ><td style="color: #161120;text-align: center;">12</td><td style="text-align: right;border-right: 1px solid black;border-left: 1px solid black;;">Aug-12</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">0</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">2</td></tr><tr ><td style="color: #161120;text-align: center;">13</td><td style="text-align: right;border-right: 1px solid black;border-left: 1px solid black;;">Sep-12</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">0</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">2</td></tr><tr ><td style="color: #161120;text-align: center;">14</td><td style="text-align: right;border-right: 1px solid black;border-left: 1px solid black;;">Oct-12</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">0</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">2</td></tr><tr ><td style="color: #161120;text-align: center;">15</td><td style="text-align: right;border-right: 1px solid black;border-left: 1px solid black;;">Nov-12</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">0</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">2</td></tr><tr ><td style="color: #161120;text-align: center;">16</td><td style="text-align: right;border-right: 1px solid black;border-left: 1px solid black;;">Dec-12</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">0</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">2</td></tr><tr ><td style="color: #161120;text-align: center;">17</td><td style="text-align: right;border-right: 1px solid black;border-left: 1px solid black;;">Jan-13</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">0</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">2</td></tr><tr ><td style="color: #161120;text-align: center;">18</td><td style="text-align: right;border-right: 1px solid black;border-left: 1px solid black;;">Feb-13</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">1</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">2</td></tr><tr ><td style="color: #161120;text-align: center;">19</td><td style="text-align: right;border-right: 1px solid black;border-left: 1px solid black;;"></td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;"></td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;"></td></tr><tr ><td style="color: #161120;text-align: center;">20</td><td style="text-align: right;border-right: 1px solid black;border-left: 1px solid black;;">Total</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">6</td><td style="text-align: center;border-right: 1px solid black;border-left: 1px solid black;;">24</td></tr><tr ><td style="color: #161120;text-align: center;">21</td><td style="text-align: right;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;;"></td><td style="text-align: right;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;;"></td><td style="text-align: right;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;;"></td></tr></tbody></table><p style="width:3.6em;font-weight:bold;margin:0;padding:0.2em 0.6em 0.2em 0.5em;border: 1px solid #BBB;border-top:none;text-align: center;background-color: #DAE7F5;color: #161120">Visits</p><br /><br />
I generated the conditional format, by setting up a rule in cell I7, and then using format painter to apply it to cells I8 to I18 inclusive.
If I click on cell I18 and then on the conditional formatting button and then on "manage rules", I get the "Conditional formatting rules manager" dialogue box, which has 2 rules showing. (The identical dialogue box appears if clicked on any of the cells I8 to I18).
Rule one reads:-
Cell value >=J9 Green highlight Applies to =$I$8:$I$18
Rule two reads:-
Cell value "less than symbol"J9 Red highlight Applies to =$I$8:$I$18
(For some strange reason, if I put the actual less than symbol in the line above, half the text doesn't appear when I preview the post...?!)
Can anyone explain why cell I18 is highlighted green (it should be red, as 1 is less than 2).
Can anyone help me to get the conditional syntax right?
Thanks
Neil