且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

根据列中的最大值有条件地删除Excel中的重复项

更新时间:2022-12-20 11:32:02

如果您不想使用VBA,可以尝试以下操作:

If you don not want to use VBA you can try this:

选择表格,然后从HOME -> Sort & Filter中选择Custom Sort.

Select the table and from HOME -> Sort & Filter select Custom Sort.

首先用wordorder : A to Z排序,然后用Add Level排序,然后用valueorder: Smallest to Largest排序.

First sort by word with order : A to Z then Add Level and sort by value with order: Smallest to Largest.

使用以下公式创建列Key(我假设您的数据具有标题,并从单元格A1开始.然后在单元格C2中放入公式=IF(B2<>B3,0,1)并向下复制.

Create a column Key with the following formula (i am assuming you data have headers and start from cell A1. Then in cell C2 put the formula =IF(B2<>B3,0,1) and copy down.

然后将特殊复制并粘贴为值列C并在列Key Descending上排序或在1上进行过滤

Then copy and paste special as values column C and sort on the column Key Descending or filter on 1

最后,复制已过滤的表并将其粘贴到其他位置,然后全部选择,然后按Data -> Remove Duplicates完成.或者,您可以先完成最后一部分,然后再执行上述步骤.

Finally, copy the filtered table and paste it elsewhere then select it all and Data -> Remove Duplicates and your done. Or you can do this last part first and then run the steps above.