formula to derive district with maximum count

vinod9111

Active Member
Joined
Jan 21, 2009
Messages
426
Hi All,

Need a formula to derive the final district by looking at the maximum count. There are duplicate accounts against which there are number of counts, the district with maximum count of these duplicate to be derived in final district column. In event of tie any one of the district can be reported. Final district is the expected results.

[TABLE="width: 474"]
<colgroup><col><col><col><col></colgroup><tbody>[TR]
[TD]Acct[/TD]
[TD]District[/TD]
[TD]Count[/TD]
[TD]Final district[/TD]
[/TR]
[TR]
[TD]02211800004661[/TD]
[TD]Akola[/TD]
[TD]4[/TD]
[TD]Akola[/TD]
[/TR]
[TR]
[TD]02211800004661[/TD]
[TD]Washim[/TD]
[TD]4[/TD]
[TD]Akola[/TD]
[/TR]
[TR]
[TD]03601800006491[/TD]
[TD]Latur[/TD]
[TD]7[/TD]
[TD]Latur[/TD]
[/TR]
[TR]
[TD]03601800006491[/TD]
[TD]Osmanabad[/TD]
[TD]1[/TD]
[TD]Latur[/TD]
[/TR]
[TR]
[TD]18101800000058[/TD]
[TD]Nagpur[/TD]
[TD]1[/TD]
[TD]Wardha[/TD]
[/TR]
[TR]
[TD]18101800000058[/TD]
[TD]Wardha[/TD]
[TD]4[/TD]
[TD]Wardha[/TD]
[/TR]
[TR]
[TD]50100001276940[/TD]
[TD]Cuddalore[/TD]
[TD]1[/TD]
[TD]Villupuram[/TD]
[/TR]
[TR]
[TD]50100001276940[/TD]
[TD]Villupuram[/TD]
[TD]9[/TD]
[TD]Villupuram[/TD]
[/TR]
</tbody>[/TABLE]

regards,

Vinod
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
This is an array formula so should be entered without the {} but confirmed with Ctrl+Shift+Enter, not just Enter. If confirmed correctly, Excel will insert the {}. The formula can then be copied down.

Excel Workbook
ABCD
1AcctDistrictCountFinal district
202211800004661Akola4Akola
302211800004661Washim4Akola
403601800006491Latur7Latur
503601800006491Osmanabad1Latur
618101800000058Nagpur1Wardha
718101800000058Wardha4Wardha
850100001276940Cuddalore1Villupuram
950100001276940Villupuram9Villupuram
Final District
 
Upvote 0

Forum statistics

Threads
1,223,895
Messages
6,175,257
Members
452,625
Latest member
saadat28

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top