简体   繁体   中英

Excel: Conditional formatting of whole row based on column value does not work

Suppose I have a simple dataset in Excel:

Column 1    Column 2
A           1
B           1
C           2
D           4
E           5
F           9

P1

Now I want to mark the whole row with green color, if the value in column 2 is larger than 3. I apply a conditional format with the formula =$B2>3 applied on range =$A$1:$B$7 and it does not work:

前一

One line where the value is 2 is marked green and one where it is 9 is not marked.

Now I want to mark the row, however only, if the value in column 2 is between 3 and 6. I apply the formula =AND(3<$B2;$B2<6) to the same range and it does not work:

ex2

Nothing is marked green.

Where is my mistake?

Update : I now also tried =AND(3<$B1;$B1<6) , but still nothing is marked green?

Change =$B2>3 to =$B1>3 which should work for you.

Your formula start range and apply start range must be same. Otherwise CF will highlight different cells.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM