Rank IF

noletwin1

New Member
Joined
May 17, 2013
Messages
25
I need to rank employees based on Product % and what their feeling they are in. I want to rank all the happy and only happy or rank all the content.

[TABLE="width: 6840"]
<colgroup><col><col span="95"></colgroup><tbody>[TR]
[TD]Employee[/TD]
[TD]001[/TD]
[TD]002[/TD]
[TD]003[/TD]
[TD]004[/TD]
[TD]007[/TD]
[TD]008[/TD]
[TD]011[/TD]
[TD]012[/TD]
[TD]021[/TD]
[TD]024[/TD]
[TD]026[/TD]
[TD]032[/TD]
[TD]033[/TD]
[TD]037[/TD]
[TD]038[/TD]
[TD]041[/TD]
[TD]042[/TD]
[TD]043[/TD]
[TD]047[/TD]
[TD]049[/TD]
[TD]050[/TD]
[TD]052[/TD]
[TD]053[/TD]
[TD]055[/TD]
[TD]056[/TD]
[TD]058[/TD]
[TD]060[/TD]
[TD]062[/TD]
[TD]064[/TD]
[TD]067[/TD]
[TD]072[/TD]
[TD]074[/TD]
[TD]075[/TD]
[TD]076[/TD]
[TD]077[/TD]
[TD]078[/TD]
[TD]080[/TD]
[TD]081[/TD]
[TD]083[/TD]
[TD]088[/TD]
[TD]089[/TD]
[TD]090[/TD]
[TD]091[/TD]
[TD]099[/TD]
[TD]101[/TD]
[TD]104[/TD]
[TD]106[/TD]
[TD]125[/TD]
[TD]132[/TD]
[TD]133[/TD]
[TD]140[/TD]
[TD]143[/TD]
[TD]155[/TD]
[TD]156[/TD]
[TD]157[/TD]
[TD]159[/TD]
[TD]161[/TD]
[TD]165[/TD]
[TD]172[/TD]
[TD]199[/TD]
[TD]220[/TD]
[TD]221[/TD]
[TD]222[/TD]
[TD]224[/TD]
[TD]245[/TD]
[TD]248[/TD]
[TD]251[/TD]
[TD]252[/TD]
[TD]254[/TD]
[TD]255[/TD]
[TD]256[/TD]
[TD]257[/TD]
[TD]258[/TD]
[TD]259[/TD]
[TD]264[/TD]
[TD]266[/TD]
[TD]267[/TD]
[TD]269[/TD]
[TD]270[/TD]
[TD]273[/TD]
[TD]274[/TD]
[TD]276[/TD]
[TD]277[/TD]
[TD]278[/TD]
[TD]279[/TD]
[TD]281[/TD]
[TD]282[/TD]
[TD]283[/TD]
[TD]285[/TD]
[TD]286[/TD]
[TD]287[/TD]
[TD]288[/TD]
[TD]289[/TD]
[TD][/TD]
[TD]290[/TD]
[TD]291[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Feeling[/TD]
[TD]Happy[/TD]
[TD]Happy[/TD]
[TD]Happy[/TD]
[TD]Happy[/TD]
[TD]Content[/TD]
[TD]Happy[/TD]
[TD]Happy[/TD]
[TD]Happy[/TD]
[TD]Happy[/TD]
[TD]Sad[/TD]
[TD]Happy[/TD]
[TD]Content[/TD]
[TD]Content[/TD]
[TD]Happy[/TD]
[TD]Happy[/TD]
[TD]Happy[/TD]
[TD]Happy[/TD]
[TD]Happy[/TD]
[TD]Happy[/TD]
[TD]Content[/TD]
[TD]Happy[/TD]
[TD]Sad[/TD]
[TD]Happy[/TD]
[TD]Happy[/TD]
[TD]Sad[/TD]
[TD]Happy[/TD]
[TD]Happy[/TD]
[TD]Sad[/TD]
[TD]Happy[/TD]
[TD]Happy[/TD]
[TD]Happy[/TD]
[TD]Happy[/TD]
[TD]Happy[/TD]
[TD]Happy[/TD]
[TD]Content[/TD]
[TD]Sad[/TD]
[TD]Happy[/TD]
[TD]Happy[/TD]
[TD]Happy[/TD]
[TD]Happy[/TD]
[TD]Happy[/TD]
[TD]Happy[/TD]
[TD]Happy[/TD]
[TD]Sad[/TD]
[TD]Sad[/TD]
[TD]Happy[/TD]
[TD]Content[/TD]
[TD]Sad[/TD]
[TD]Content[/TD]
[TD]Content[/TD]
[TD]Content[/TD]
[TD]Happy[/TD]
[TD]Happy[/TD]
[TD]Happy[/TD]
[TD]Content[/TD]
[TD]Happy[/TD]
[TD]Content[/TD]
[TD]Sad[/TD]
[TD]Happy[/TD]
[TD]Other[/TD]
[TD]Happy[/TD]
[TD]Sad[/TD]
[TD]Content[/TD]
[TD]Content[/TD]
[TD]Happy[/TD]
[TD]Sad[/TD]
[TD]Sad[/TD]
[TD]Sad[/TD]
[TD]Content[/TD]
[TD]Upset[/TD]
[TD]Upset[/TD]
[TD]Content[/TD]
[TD]Upset[/TD]
[TD]Upset[/TD]
[TD]Upset[/TD]
[TD]Upset[/TD]
[TD]Sad[/TD]
[TD]Upset[/TD]
[TD]Content[/TD]
[TD]Upset[/TD]
[TD]Upset[/TD]
[TD]Upset[/TD]
[TD]Upset[/TD]
[TD]Upset[/TD]
[TD]Upset[/TD]
[TD]Upset[/TD]
[TD]Content[/TD]
[TD]Upset[/TD]
[TD]Upset[/TD]
[TD]Upset[/TD]
[TD]Upset[/TD]
[TD]Upset[/TD]
[TD]Upset[/TD]
[TD][/TD]
[TD]Upset[/TD]
[TD]Upset[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Product %[/TD]
[TD="align: right"]22%[/TD]
[TD="align: right"]1%[/TD]
[TD="align: right"]2%[/TD]
[TD="align: right"]20%[/TD]
[TD="align: right"]21%[/TD]
[TD="align: right"]2%[/TD]
[TD="align: right"]3%[/TD]
[TD="align: right"]5%[/TD]
[TD="align: right"]13%[/TD]
[TD="align: right"]1%[/TD]
[TD="align: right"]7%[/TD]
[TD="align: right"]5%[/TD]
[TD="align: right"]3%[/TD]
[TD="align: right"]5%[/TD]
[TD="align: right"]7%[/TD]
[TD="align: right"]7%[/TD]
[TD="align: right"]4%[/TD]
[TD="align: right"]1%[/TD]
[TD="align: right"]1%[/TD]
[TD="align: right"]4%[/TD]
[TD="align: right"]3%[/TD]
[TD="align: right"]3%[/TD]
[TD="align: right"]2%[/TD]
[TD="align: right"]11%[/TD]
[TD="align: right"]1%[/TD]
[TD="align: right"]6%[/TD]
[TD="align: right"]3%[/TD]
[TD="align: right"]3%[/TD]
[TD="align: right"]15%[/TD]
[TD="align: right"]12%[/TD]
[TD="align: right"]1%[/TD]
[TD="align: right"]6%[/TD]
[TD="align: right"]4%[/TD]
[TD="align: right"]8%[/TD]
[TD="align: right"]6%[/TD]
[TD="align: right"]4%[/TD]
[TD="align: right"]1%[/TD]
[TD="align: right"]10%[/TD]
[TD="align: right"]5%[/TD]
[TD="align: right"]1%[/TD]
[TD="align: right"]1%[/TD]
[TD="align: right"]11%[/TD]
[TD="align: right"]25%[/TD]
[TD="align: right"]14%[/TD]
[TD="align: right"]3%[/TD]
[TD="align: right"]17%[/TD]
[TD="align: right"]3%[/TD]
[TD="align: right"]0%[/TD]
[TD="align: right"]3%[/TD]
[TD="align: right"]6%[/TD]
[TD="align: right"]8%[/TD]
[TD="align: right"]7%[/TD]
[TD="align: right"]6%[/TD]
[TD="align: right"]10%[/TD]
[TD="align: right"]2%[/TD]
[TD="align: right"]6%[/TD]
[TD="align: right"]17%[/TD]
[TD="align: right"]14%[/TD]
[TD="align: right"]6%[/TD]
[TD="align: right"]19%[/TD]
[TD="align: right"]0%[/TD]
[TD="align: right"]0%[/TD]
[TD="align: right"]1%[/TD]
[TD="align: right"]4%[/TD]
[TD="align: right"]3%[/TD]
[TD="align: right"]3%[/TD]
[TD="align: right"]0%[/TD]
[TD="align: right"]0%[/TD]
[TD="align: right"]30%[/TD]
[TD="align: right"]23%[/TD]
[TD="align: right"]29%[/TD]
[TD="align: right"]15%[/TD]
[TD="align: right"]25%[/TD]
[TD="align: right"]54%[/TD]
[TD="align: right"]10%[/TD]
[TD="align: right"]16%[/TD]
[TD="align: right"]14%[/TD]
[TD="align: right"]15%[/TD]
[TD="align: right"]39%[/TD]
[TD="align: right"]23%[/TD]
[TD="align: right"]24%[/TD]
[TD="align: right"]24%[/TD]
[TD="align: right"]29%[/TD]
[TD="align: right"]17%[/TD]
[TD="align: right"]34%[/TD]
[TD="align: right"]30%[/TD]
[TD="align: right"]30%[/TD]
[TD="align: right"]21%[/TD]
[TD="align: right"]39%[/TD]
[TD="align: right"]23%[/TD]
[TD="align: right"]17%[/TD]
[TD="align: right"]19%[/TD]
[TD="align: right"]15%[/TD]
[TD="align: right"][/TD]
[TD="align: right"]13%[/TD]
[TD="align: right"]30%[/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD]Happy Rank[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[/TR]
</tbody>[/TABLE]
Content Rank
Sad Rank
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Maybe:

ABCDEFGHIJKLM
Employee
FeelingHappyHappyHappyHappyContentHappyHappyHappyHappySadHappyContent
Product %
Happy
Content
Sad

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]

[TD="align: right"]1[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]7[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]11[/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]21[/TD]
[TD="align: right"]24[/TD]
[TD="align: right"]26[/TD]
[TD="align: right"]32[/TD]

[TD="align: center"]2[/TD]

[TD="align: center"]3[/TD]

[TD="align: right"]22%[/TD]
[TD="align: right"]1%[/TD]
[TD="align: right"]2%[/TD]
[TD="align: right"]20%[/TD]
[TD="align: right"]21%[/TD]
[TD="align: right"]2%[/TD]
[TD="align: right"]3%[/TD]
[TD="align: right"]5%[/TD]
[TD="align: right"]13%[/TD]
[TD="align: right"]1%[/TD]
[TD="align: right"]7%[/TD]
[TD="align: right"]5%[/TD]

[TD="align: center"]4[/TD]

[TD="align: right"]2[/TD]
[TD="align: right"]34[/TD]
[TD="align: right"]31[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"][/TD]
[TD="align: right"]31[/TD]
[TD="align: right"]27[/TD]
[TD="align: right"]22[/TD]
[TD="align: right"]6[/TD]
[TD="align: right"][/TD]
[TD="align: right"]13[/TD]
[TD="align: right"][/TD]

[TD="align: center"]5[/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"]4[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"]10[/TD]

[TD="align: center"]6[/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"]9[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

</tbody>
Sheet5

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Array Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: #DAE7F5"]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]B4[/TH]
[TD="align: left"]{=IF(B$2=$A4,MIN(IF(B$3=LARGE(IF($B$2:$CS$2=$A4,$B$3:$CS$3,""),ROW(INDIRECT("1:"&COUNTIF($B$2:$CS$2,$A4)))),ROW(INDIRECT("1:"&COUNTIF($B$2:$CS$2,$A4))))),"")}[/TD]
[/TR]
</tbody>[/TABLE]
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
Or

Put in A4:A6 just the keywords, Happy, Content and Sad


[Table="class: grid"][tr][td="bgcolor: #DCE6F1"][/td][td="bgcolor: #DCE6F1"]
A
[/td][td="bgcolor: #DCE6F1"]
B
[/td][/tr]
[tr][td="bgcolor: #DCE6F1"]
4
[/td][td]
Happy​
[/td][td]
2​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
5
[/td][td]
Content​
[/td][td][/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
6
[/td][td]
Sad​
[/td][td][/td][/tr]
[/table]


Formula in B4
=IF(B$2=$A4,COUNTIFS($B$3:$CS$3,">"&B$3,$B$2:$CS$2,$A4)+1,"")

copy across and down

M.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,185
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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