如何使用Excel / VBA查找每个唯一column_a元素的max column_c的column_b值

时间:2017-04-07 15:24:53

标签: excel-vba vba excel

输入数据表如下所示:

Column_a   Column_b   Column_c
Apple      Big        60%
Apple      Mid        30%
Apple      Small      10%
Pear       Big        20%
Pear       Small      80%
Pineapple  Huge       30%
Pineapple  Big        20%
Pineapple  Mid        20%
Pineapple  Small      20%
Pineapple  Tiny       10%

预期回归表:

Column_a  Column_b  Column_c
Apple     Big       60%
Pear      Small     80%
Pineapple Huge      30%

1 个答案:

答案 0 :(得分:0)

两个非常简单的步骤,都来自功能区上的“数据”选项卡。

  1. 数据>排序>在C列(大到小
  2. 数据>删除重复项>在A栏上
  3. Column_a    Column_b    Column_c
    Pear         Small       80%
    Apple        Big         60%
    Pineapple    Huge        30%