Creating a formula to find the most common string given a second variable?

aussiebob

New Member
Joined
Dec 6, 2013
Messages
1
I will start this by saying I don't know much about excel, but I do know that formula for this problem is beyond my skill level and beyond what a simple Google search will answer.

The challenge is:
I have 5 areas (Cans/Contingent/Kegs/Maintenance/Bottle) that submit daily codes (20 different code choices) and give each codes a ranking (1-5).

I would like to create a couple of formulas;
1) For each area I need to know which is the most common code used
2) What is the mean rating for that most common code

In the example below I have shown data on the right (Areas/Codes/Ranking) and on the left are the cells I need formula for (?).

This example below shows all the variable but only a fraction of the data - otherwise I could manually workout the answers but since I get so much data and it needs to be reviewed weekly I would prefer a function.

Any help before I pull out what little hair I have left would be greatly appreciated.
Area

<tbody>
</tbody>
Most common code

<tbody>
</tbody>
Average rating of most common code

<tbody>
</tbody>
Area

<tbody>
</tbody>
Code

<tbody>
</tbody>
Rating

<tbody>
</tbody>
Cans

<tbody>
</tbody>
????????
Cans

<tbody>
</tbody>
HMG

<tbody>
</tbody>
2
Contingent

<tbody>
</tbody>
????????ContingentHPE1
Kegs

<tbody>
</tbody>
????????MaintenanceHHE2
Maintenance

<tbody>
</tbody>
????????
Cans

<tbody>
</tbody>
HCE1
Bottles

<tbody>
</tbody>
????????KegsHOT2
ContingentHFT3
Cans

<tbody>
</tbody>
HLD4
KegsHSF3
Cans

<tbody>
</tbody>
HMG

<tbody>
</tbody>
2
ContingentHEB2
Cans

<tbody>
</tbody>
HPE4
Cans

<tbody>
</tbody>
HNM1
KegsHCE1
MaintenanceHBM5
Cans

<tbody>
</tbody>
HFT3
BottlesHPE3
KegsHBN2
Cans

<tbody>
</tbody>
HMG

<tbody>
</tbody>
4
Cans

<tbody>
</tbody>
HBN5
KegsHCS5
ContingentHEB2
Cans

<tbody>
</tbody>
HCE3
MaintenanceHMH5
KegsHBN1
BottlesHPE1
ContingentHOT2
Cans

<tbody>
</tbody>
HER3
Kegs
HMG

<tbody>
</tbody>
2
BottlesHFT3
KegsHSF4
Cans

<tbody>
</tbody>
HCE1
ContingentHEB5
MaintenanceHPE2
KegsHHE4
Cans

<tbody>
</tbody>
HNM2
BottlesHCE3
ContingentHBM1
MaintenanceHLD5
KegsHBN2
Cans

<tbody>
</tbody>
HMG

<tbody>
</tbody>
5
ContingentHPE3
BottlesHFT1
ContingentHOT4
MaintenanceHBN2
Cans

<tbody>
</tbody>
HMH5
KegsHSF5
BottlesHEB4
Cans

<tbody>
</tbody>
HCE3
MaintenanceHNM2
ContingentHPE4
Cans

<tbody>
</tbody>
HMG

<tbody>
</tbody>
1
KegsHBM3
Cans

<tbody>
</tbody>
HCS2
ContingentHNM4
ContingentHHW5
BottlesHPE2
Cans

<tbody>
</tbody>
HFT4
KegsHOT2
BottlesHMV4
Cans

<tbody>
</tbody>
HCE1
MaintenanceHMV3
ContingentHBM3
KegsHSF1
Cans

<tbody>
</tbody>
HPE5
ContingentHEB4
ContingentHHW2
Kegs
HMG

<tbody>
</tbody>
5
BottlesHCS1
Cans

<tbody>
</tbody>
HLD3
BottlesHMH2
MaintenanceHOT5
KegsHCE3
Cans

<tbody>
</tbody>
HFT4
KegsHEF2
ContingentHPE5
Cans

<tbody>
</tbody>
HEB1
MaintenanceHPT1
Cans

<tbody>
</tbody>
HSF3
ContingentHHE4
Cans

<tbody>
</tbody>
HPE2
BottlesHCE5
Contingent
HMG

<tbody>
</tbody>
4
Cans

<tbody>
</tbody>
HPT3
KegsHFT5
BottlesHMH2
Cans

<tbody>
</tbody>
HLD1
KegsHCS4
MaintenanceHOT5
ContingentHPE2
KegsHEE5
Cans

<tbody>
</tbody>
HEB1
KegsHCE4
ContingentHMH3
Cans

<tbody>
</tbody>
HFT5
Kegs
HMG

<tbody>
</tbody>
2
Cans

<tbody>
</tbody>
HSF4
MaintenanceHCE3
Cans

<tbody>
</tbody>
HPE1
Kegs
HMG

<tbody>
</tbody>
2

<tbody>
</tbody>

Thanks in advance!
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.

Forum statistics

Threads
1,215,090
Messages
6,123,061
Members
449,091
Latest member
ikke

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