Forum Discussion

lezboyd's avatar
lezboyd
Copper Contributor
Sep 04, 2019
Solved

Conditional Formatting doesn't work correctly with Data Validation

I am facing an issue in Excel 2010, whereby if I try to apply Conditional Formatting on a selection that also contains cells/columns with Data Validation applied, then it doesn't work as expected.  ...
  • lezboyd 

    When you select a range for conditional formatting and trying to create a new rule based on a formula, always pay attention to the row# used in the formula, it must match the row# of the first row in the selected range.

    So if you select the range A2:N103 and create a new rule for conditional formatting using your formula for highlighting the rows where column K has a "Y" in it, it will correctly highlight the rows as the first row in the selected range A2:N103 is row#2 and the row# of the cell you are referencing in your formula (=$K2="Y") is also row#2 and they both match.

    But if you select the whole columns A:N, the first row in the selected range will be row#1 which doesn't match with the row# used in your formula which is row#2 hence the highlighted rows will be off by one row down.

     

    Also, make sure that you don't have multiple conditional formatting rules for the same rule so it's always a best practice to select all the range once and not applying the conditional formatting to specific range and then using the format painter to copy the same conditional formatting to the other ranges otherwise you will end up with multiple conditional formatting rules.

     

    In the attached, I have applied the conditional formatting based on your formula, see if that works as desired.

     

Resources