2

I have a set of data like below:

        A
1      10
2      34
3      30
4       5
5      35
6      45
7      60
8      21

If I wish to find the maximum of the numbers under the A column and also match the row number corresponding to such max. number; I use:

=MATCH(MAX(A1:A8),A1:A8,0) 

will give me (in the current cell): 7 (max. is 60 corresponding to row 7) Now, I wish to "color code"that number (i.e 60)
when I use "Conditional Formatting" in Excel;

  1. I select A1:A8
  2. I go to "Conditional Formatting" and select"New Rule" and then "Use a Formula to determine which cells to format" and under "Format values where this formula is true" I type in:

    =MATCH(MAX(A1:A8),A1:A8,0) 
    

and then click on the "Format" button to select my color (say yellow).
However, I find that all the numbers under column A are now color coded (filled) with yellow color where as I only wish number 60 to be yellow. How can I do this?

4

2 回答 2

2

如果您不需要在条件格式中使用公式,那么这里是另一种选择。

Conditional Formatting | New Rule | Format only top or bottom ranked values并将值设置为1withTop作为参数。

在此处输入图像描述

于 2013-10-19T20:20:37.733 回答
1

去:

“条件格式”->“新规则”->“仅格式化包含的单元格”。

将规则设置为“等于”并键入以下公式:

=MAX($A$1:$A$8)

选择按钮上的黄色颜色Format...并单击OK

于 2013-10-19T19:54:27.380 回答