Finding the Top 5 of text filled column by the different Years in the data!

Edward_Les

New Member
Joined
Oct 13, 2017
Messages
3
I would like help solving this problem, Finding the Top 5 of text filled column by the different Years in the data.

I have a set of data in one sheet that covers 3 Fiscal years FY15, FY16 and FY17 (Column named "Open_FY") and sub categories of issues (named SubCat) this are workplace issues like Hostile Work Environment, Dignity and Respect, Theft... so in another sheet I layout the data in tables and charts and one table is the top 5 subcategories by Open_FY...

I can get the Top 5 for the over all date with this formula: =INDEX(SubCat,MATCH(LARGE(FREQUENCY(MATCH(SubCat,SubCat,0),ROW(SubCat)-ROW('FY16-FY17 Recieved'!$M$1)+1)+ROW('Prepared Foods FY16-FY17.xlsx'!SubCat_Plus1)/10000,ROWS(R$109:R109)),FREQUENCY(MATCH(SubCat,SubCat,0),ROW(SubCat)-ROW('FY16-FY17 Recieved'!$M$1)+1)+ROW(SubCat_Plus1)/10000,0)))

But can't find a way to get the correct Top 5 by Open_FY, an ideas? Thank you!

Sample data:
A 1BCDE
2Open FYClosed FYCategorySubCategory
3FY15FY15Employment PracticesCorrective Action
4FY15FY16Workplace ViolenceDisorderly Conduct
5FY15FY16Workplace ViolenceDisorderly Conduct
6FY15FY15DiscriminationHostile Work Environment
7FY15FY15DiscriminationHostile Work Environment
8FY15FY15HarassmentHostile Work Environment (Sexual)
9FY15FY15Management Standards of BehaviorInappropriate Language
10FY15FY15Work AssignmentJob Bid/Posting
11FY15FY16Work AssignmentJob Duties
12FY15FY16Work AssignmentJob Duties
13FY15FY15DiscriminationRace
14FY15FY15HarassmentSexual Harassment
15FY16FY16Hourly Team MemberInappropriate Language
16FY16FY17Management Standards of BehaviorInappropriate Language
17FY16FY16HarassmentHostile Work Environment (Sexual)
18FY16FY16Work AssignmentJob Bid/Posting
19FY16FY17Workplace ViolenceDisorderly Conduct
20FY16FY16Work AssignmentJob Duties
21FY16FY16Safeguarding of AssetsTheft of time
22FY16FY17Employment PracticesPolicy Inquiry/Clarification
23FY16FY16HarassmentRace
24FY16FY16Health & SafetyPPE/Supplies
25FY16FY16Work AssignmentJob Bid/Posting
26FY16FY16Safeguarding of AssetsTheft of time
27FY16FY16Work AssignmentJob Bid/Posting
28FY16FY16Workplace ViolenceDisorderly Conduct
29FY16FY17Work AssignmentJob Duties
30FY16FY16Hourly Team MemberInappropriate Language
31FY16FY16Management Standards of BehaviorInappropriate Language
32FY16FY16HarassmentHostile Work Environment (Sexual)
33FY16FY16Work AssignmentJob Bid/Posting
34FY16FY16Workplace ViolenceDisorderly Conduct
35FY16FY16Work AssignmentJob Duties
36FY16FY17Safeguarding of AssetsTheft of time
37FY16FY16Employment PracticesPolicy Inquiry/Clarification

<colgroup><col><col span="2"><col><col></colgroup><tbody>
</tbody>
Expected Return:
Top 3 FY 15
1. Disorderly Conduct
2. Hostile Work Environment
3. Job Duties


<colgroup><col span="2"><col><col></colgroup><tbody>
</tbody>

 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Here's one way:

Excel 2016 (Windows) 32 bit
ABCDEFGHI
1
2Open FYClosed FYCategorySubCategoryOpen FYTop 3
3FY15FY15Employment PracticesCorrective ActionFY15Job Duties
4FY15FY16Workplace ViolenceDisorderly ConductHostile Work Environment
5FY15FY16Workplace ViolenceDisorderly ConductDisorderly Conduct
6FY15FY15DiscriminationHostile Work Environment
7FY15FY15DiscriminationHostile Work Environment
8FY15FY15HarassmentHostile Work Environment (Sexual)
9FY15FY15Management Standards of BehaviorInappropriate Language
10FY15FY15Work AssignmentJob Bid/Posting
11FY15FY16Work AssignmentJob Duties
12FY15FY16Work AssignmentJob Duties
13FY15FY15DiscriminationRace
14FY15FY15HarassmentSexual Harassment
15FY16FY16Hourly Team MemberInappropriate Language
16FY16FY17Management Standards of BehaviorInappropriate Language
17FY16FY16HarassmentHostile Work Environment (Sexual)
18FY16FY16Work AssignmentJob Bid/Posting
19FY16FY17Workplace ViolenceDisorderly Conduct
20FY16FY16Work AssignmentJob Duties
21FY16FY16Safeguarding of AssetsTheft of time
22FY16FY17Employment PracticesPolicy Inquiry/Clarification
23FY16FY16HarassmentRace
24FY16FY16Health & SafetyPPE/Supplies
25FY16FY16Work AssignmentJob Bid/Posting
26FY16FY16Safeguarding of AssetsTheft of time
27FY16FY16Work AssignmentJob Bid/Posting
28FY16FY16Workplace ViolenceDisorderly Conduct
29FY16FY17Work AssignmentJob Duties
30FY16FY16Hourly Team MemberInappropriate Language
31FY16FY16Management Standards of BehaviorInappropriate Language
32FY16FY16HarassmentHostile Work Environment (Sexual)
33FY16FY16Work AssignmentJob Bid/Posting
34FY16FY16Workplace ViolenceDisorderly Conduct
35FY16FY16Work AssignmentJob Duties
36FY16FY17Safeguarding of AssetsTheft of time
37FY16FY16Employment PracticesPolicy Inquiry/Clarification

<tbody>
</tbody>
Sheet2

Array Formulas
CellFormula
I3=IFERROR(INDEX($D$3:$D$37,MOD(LARGE(IF($A$3:$A$37=$H$3,IF(MATCH($A$3:$A$37&"|"&$D$3:$D$37,$A$3:$A$37&"|"&$D$3:$D$37,0)=ROW($A$3:$A$37)-ROW($A$3)+1,COUNTIFS($A$3:$A$37,$H$3,$D$3:$D$37,$D$3:$D$37)+(ROW($A$3:$A$37)-ROW($A$3)+1)/10000)),ROWS($I$3:$I3)),1)*10000),"")

<tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>



In case of ties, the list will show the values in reverse order of incidence. I assume you can adjust the ranges to match your sheet and defined names.

Hope this works for you.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,216,028
Messages
6,128,391
Members
449,445
Latest member
JJFabEngineering

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