pjandshelly

Board Regular
Joined
Jan 25, 2017
Messages
61
I am working with a large data set. The values are included in two different columns. A lot of the values have very little value to the overall report impact. What I want to do is identify the top 10 items by percentages that have a number greater than 50 in my top 10 table separate from the main data set.

Service percentage Number of visits
Cardiology 15% 65
Medicine 16% 75
Surgery 17% 30

My final output would be:
Medicine
Cardiology

Surgery would not be included in the results because it only had 30 visits. Any help would be appreciated.
 
one last wrinkle.

You could try like this:


Excel 2013/2016
ABCDEFGH
1ServicepercentageNumber of visitsDate%VistsService
2Cardiology20%6501-Apr-1925%99Dental
3Medicine25%7501-Apr-1925%75Medicine
4Surgery60%3001-Apr-1915%55Cardiology
5Cardiology15%5501-May-19
6Medicine25%7501-May-19
7Surgery20%2501-May-19
8Dental25%9901-May-19
Sheet1
Cell Formulas
RangeFormula
F2=IFERROR(AGGREGATE(14,6,$B$2:$B$8/(($C$2:$C$8>50)*($D$2:$D$8=MAX($D$2:$D$8))),ROWS(F$2:F2)),"")
G2=IF(F2="","",AGGREGATE(14,6,$C$2:$C$8/(($C$2:$C$8>50)*($D$2:$D$8=MAX($D$2:$D$8))*($B$2:$B$8=F2)),COUNTIFS(F$2:F2,F2)))
H2=IF(F2="","",INDEX($A$2:$A$8,AGGREGATE(15,6,(ROW($A$2:$A$8)-MIN(ROW($A$2:$A$8))+1)/(($B$2:$B$8=F2)*($C$2:$C$8>50)*($D$2:$D$8=MAX($D$2:$D$8))*($C$2:$C$8=G2)),COUNTIFS(F$2:F2,F2,G$2:G2,G2))))
 
Upvote 0

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
You could try like this:

Excel 2013/2016
ABCDEFGH
1ServicepercentageNumber of visitsDate%VistsService
2Cardiology20%6501-Apr-1925%99Dental
3Medicine25%7501-Apr-1925%75Medicine
4Surgery60%3001-Apr-1915%55Cardiology
5Cardiology15%5501-May-19
6Medicine25%7501-May-19
7Surgery20%2501-May-19
8Dental25%9901-May-19

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1

Worksheet Formulas
CellFormula
F2=IFERROR(AGGREGATE(14,6,$B$2:$B$8/(($C$2:$C$8>50)*($D$2:$D$8=MAX($D$2:$D$8))),ROWS(F$2:F2)),"")
G2=IF(F2="","",AGGREGATE(14,6,$C$2:$C$8/(($C$2:$C$8>50)*($D$2:$D$8=MAX($D$2:$D$8))*($B$2:$B$8=F2)),COUNTIFS(F$2:F2,F2)))
H2=IF(F2="","",INDEX($A$2:$A$8,AGGREGATE(15,6,(ROW($A$2:$A$8)-MIN(ROW($A$2:$A$8))+1)/(($B$2:$B$8=F2)*($C$2:$C$8>50)*($D$2:$D$8=MAX($D$2:$D$8))*($C$2:$C$8=G2)),COUNTIFS(F$2:F2,F2,G$2:G2,G2))))

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>
Cell G2 came back with values that didn't match the service and percentage. Not sure where the numbers are pulling from. This is my script:

=IF(C86="","",AGGREGATE(14,6,(ROW($X$6:$X$1162)/($X$6:$X$1162>50)*($U$6:$U$1162=MAX($U$6:$U$1162))*($W$6:$W$1162=C86)),COUNTIFS(C$86:C86,C86)))
the Values that came back were:

Stop CodeNo Show Rate (Combined)No Shows (Combined)# that it should have been
(560) SUB USE DISORDER GROUP26.20%968
(513) SUB USE DISORDER INDIV21.30%1765
(550) MH CLINIC GROUP16.80%19101
(502) MH CLINIC IND16.50%22518
(534) MH INTGRTD CARE IND14.40%2552
(160) CLINICAL PHARMACY13.90%2761
(205) PHYSICAL THERAPY11.60%45156
(408) OPTOMETRY11.60%44121
(323) PRIMARY CARE/MEDICINE10.90%49659
(180) DENTAL8.90%60107

<colgroup><col><col><col><col></colgroup><tbody>
</tbody>
 
Upvote 0
This is my script:

=IF(C86="","",AGGREGATE(14,6,(ROW($X$6:$X$1162)/($X$6:$X$1162>50)*($U$6:$U$1162=MAX($U$6:$U$1162))*($W$6:$W$1162=C86)),COUNTIFS(C$86:C86,C86)))

Hi, that doesn't look like the suggested formula in post#11
 
Upvote 0

Forum statistics

Threads
1,215,465
Messages
6,124,975
Members
449,200
Latest member
Jamil ahmed

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