Forum Discussion
G_M_C
Mar 01, 2024Copper Contributor
Keep only the rows with highest values in column C when column A and B have equal values
Hello! I have an Excel table like the one below and I want to keep only the rows with highest values in column C when column A and B have equal values and also to keep all the rows that have differe...
HansVogelaar
Mar 01, 2024MVP
I'd create a helper formula in column D with formula
=C2=MAXIFS($C$2:$C$1000,$A$2:$A$1000,A2,$B$2:$B$1000,B2)
in D2, filled down.
You can then filter for FALSE.
Delete the filtered rows, and finally remove the filter.
- G_M_CMar 01, 2024Copper ContributorHello!
That worked, thanks a lot!
Also, it worked with the following formula, sugested by OliverScheurich:
=IF(OR(LARGE(IF(($A$2:$A$23=$A2)*($B$2:$B$23=$B2),$C$2:$C$23),1)=$C2,COUNTIFS($A$2:$A$23,$A2,$B$2:$B$23,$B2)=1),A2,"")
I hope it will help other users too.
All the best!