Formula to identify the bottom 2 percentage and extract those rows.

Ebraham

Board Regular
Joined
Mar 21, 2015
Messages
215
i have below pivot where i want to extract the bottom 2 percentage from satisfied/Dissatisfied column at an custom and supervisor level.

YearsSupervisorCustomSatisfied/Dis-satisfiedof inquiries
2019asmani1Aalia
100%​
5​
2019asmani1judaan
33%​
6​
2019asmani1Kompal
67%​
2​
2019asmani3Yogesh
0%​
0​
2019asmani3Baba
40%​
1​
2019asmani3Sonam
50%​
3​
2020asmani3kabhikasha
31%​
5​
2020asmani3chandbhai
7%​
6​
2020asmani3Deep
18%​
4​
2020asmiani2Deshbhakt
18%​
6​
2020asmiani2Manish
40%​
7​
2020asmiani2Singh
20%​
2​

For example if i select asmani1 in the datavalidation drop down for supervisor then the display figures for other columns should be as below.

SupervisorCustomSatisfied/Dis-satisfiedof inquiries
asmani1judaan
33%​
6​
kompal
67%​
2​

Thanks in advance. !!.
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Hi Ebraham,

Does this do what you want?

Ebraham.xlsx
ABCDEFGHIJKL
1YearsSupervisorCustomSatisfied/Dis-satisfiedof inquiriesSelectionSupervisorCustomSatisfied/Dis-satisfiedof inquiries
22019asmani1Aalia100%5asmani1asmani1judaan33%6
32019asmani1judaan33%6asmani1Kompal67%2
42019asmani1Kompal67%2
52019asmani3Yogesh0%0
62019asmani3Baba40%1
72019asmani3Sonam50%3
82020asmani3kabhikasha31%5
92020asmani3chandbhai7%6
102020asmani3Deep18%4
112020asmiani2Deshbhakt18%6
122020asmiani2Manish40%7
132020asmiani2Singh20%2
14
Sheet1
Cell Formulas
RangeFormula
L2:L3,I2:J3I2=INDEX(B$2:B$16,MATCH(1,INDEX(($K2=$D$2:$D$16)*($G$2=$B$2:$B$16),0,1),0))
K2:K3K2=AGGREGATE(15,6,$D$2:$D$16/($B$2:$B$16=$G$2),ROW()-ROW($K$1))
Cells with Data Validation
CellAllowCriteria
G2Listasmani1, asmani3, asmiani2
 
Upvote 0
Hi ,

Thanks for the reply.

it works well even if my data book is closed.

it almost 95% did the work for me but while testing i had one error that is if i have duplicate % in column satisfies/Dissatisfied than the extraction for the other columns is not proper. ie it catches the first matched row as a lookup for the second duplicated %.
 
Upvote 0
This should resolve the tie issue.

Book1
ABCDEFGHIJKL
1YearsSupervisorCustomSatisfied/Dis-satisfiedof inquiriesSelectionSupervisorCustomSatisfied/Dis-satisfiedof inquiries
22019asmani1Aalia15asmani1asmani1judaan0.336
32019asmani1judaan0.336asmani1Kompal0.332
42019asmani1Kompal0.332
52019asmani3Yogesh00
62019asmani3Baba0.41
72019asmani3Sonam0.53
82020asmani3kabhikasha0.315
92020asmani3chandbhai0.076
102020asmani3Deep0.184
112020asmiani2Deshbhakt0.186
122020asmiani2Manish0.47
132020asmiani2Singh0.22
14
Sheet3
Cell Formulas
RangeFormula
I2:I3I2=G$2
J2:J3J2=INDEX(C:C,AGGREGATE(15,6,ROW($B$2:$B$16)/($D$2:$D$16=K2)/($B$2:$B$16=$G$2),COUNTIF(K$2:K2,K2)))
K2:K3K2=AGGREGATE(15,6,$D$2:$D$16/($B$2:$B$16=$G$2),ROW()-ROW($K$1))
L2:L3L2=SUMIFS(E:E,B:B,I2,C:C,J2)
 
Upvote 0
Thanks for the reply.

Can we have any other alternatives other than countif and sumifs as I can have such data in closed book as well.
 
Upvote 0
L2: =INDEX(E:E,AGGREGATE(15,6,ROW($B$2:$B$16)/($D$2:$D$16=K2)/($B$2:$B$16=$G$2),COUNTIF(K$2:K2,K2)))

Same as the J2 formula except for the range. The COUNTIF in thiis formula should be OK, since it will refer to the workbook with the formula, not the workbook with the data.
 
Upvote 0

Forum statistics

Threads
1,223,981
Messages
6,175,771
Members
452,668
Latest member
mrider123

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